Disable Right-Click Blocker Everywhere

Simple Script to Disable right-click blockers on Most websites With Simple Protection

当前为 2024-07-19 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Disable Right-Click Blocker Everywhere
  3. // @version 0.2
  4. // @description Simple Script to Disable right-click blockers on Most websites With Simple Protection
  5. // @author Elfhuo, ChatGPT
  6. // @match *://*/*
  7. // @grant none
  8. // @namespace https://greasyfork.org/users/1293519
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict';
  13.  
  14. function checkRightClickBlocker() {
  15. if (window.oncontextmenu !== null) {
  16. window.oncontextmenu = null;
  17. }
  18. }
  19.  
  20. checkRightClickBlocker();
  21.  
  22. var observer = new MutationObserver(function(mutations) {
  23. mutations.forEach(function(mutation) {
  24. checkRightClickBlocker();
  25. });
  26. });
  27.  
  28. observer.observe(document.body, { childList: true, subtree: true });
  29. })();