杀死“麦欧兔”

如题

安裝腳本?
作者推薦腳本

您可能也會喜歡 链接地址洗白白

安裝腳本
  1. // ==UserScript==
  2. // @name 杀死“麦欧兔”
  3. // @namespace killer the mailto
  4. // @version 0.0.4
  5. // @author 稻米鼠
  6. // @description 如题
  7. // @run-at document-idle
  8. // @homepage https://meta.appinn.com/t/9230
  9. // @supportURL https://meta.appinn.com/t/9230
  10. // @match *://*/*
  11. // @grant GM_setClipboard
  12. // ==/UserScript==
  13.  
  14. const oldLoadFun = window.onload
  15. window.onload=function(){
  16. oldLoadFun && oldLoadFun()
  17. document.querySelectorAll('p').forEach((el, index, thisArray)=>{
  18. el.innerText.match(/[A-Za-z0-9+/]*={0,2}(?=[^>]*(<[^\/script|^\/style]|$))/g).forEach((strMaybeBase64)=>{
  19. if(strMaybeBase64.length>0){
  20. try{
  21. const strText = window.atob(strMaybeBase64)
  22. if(strText.match(/^([A-Za-z0-9_\-.])+\@([A-Za-z0-9_\-.])+\.([A-Za-z]{2,6})$/) !== null){
  23. const reg = new RegExp(strMaybeBase64+'(?=[^>]*(<(?!\/(script|style))|$))', 'gi')
  24. const newCode = '<a href="mailto:'+strText+'">'+strText+'</a>'
  25. el.innerHTML = el.innerHTML.replace(reg, newCode)
  26. }
  27. }
  28. catch(e){}
  29. }
  30. })
  31. if(index === thisArray.length-1){
  32. document.querySelectorAll('a[href^=mailto]').forEach((thelink)=>{
  33. const themail = thelink.href.replace(/^mailto:(.*?@[^?]*).*$/i, '$1')
  34. thelink.onclick = function(e){ e.preventDefault(e) }
  35. thelink.addEventListener('click', (e)=>{
  36. e.preventDefault(e)
  37. GM_setClipboard(themail)
  38. alert('这是一个没有什么必要的通知,\n只是想告诉你,邮件地址成功的复制到了你的剪切板中。\n(也许吧……')
  39. e.preventDefault()
  40. })
  41. })
  42. }
  43. })
  44. }

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址