通用事件监听阻止

阻止你想要阻止的事件监听

  1. // ==UserScript==
  2. // @name 通用事件监听阻止
  3. // @namespace http://tampermonkey.net/
  4. // @version 2024-02-05
  5. // @description 阻止你想要阻止的事件监听
  6. // @author hatrd
  7. // @match http://*/*
  8. // @match https://*/*
  9. // @run-at document-start
  10. // @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
  11. // @grant none
  12. // @license MIT
  13. // ==/UserScript==
  14.  
  15. (function() {
  16. 'use strict';
  17. let oldadd=EventTarget.prototype.addEventListener
  18. EventTarget.prototype.addEventListener=function (...args){
  19. if(window.onblur!==null){
  20. window.onblur=null;
  21. }
  22. if(args.length!==0 && ['copy', ].includes(args[0])){
  23. console.log('[+] 阻止 ' + args[0] + ' 监听成功!')
  24. return;
  25. }
  26. return oldadd.call(this,...args)
  27. }
  28. // Your code here...
  29. })();

QingJ © 2025

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