"Right Click Block" and "Select Block" Blocker

Block the right click and mouse select blockers.

  1. // ==UserScript==
  2. // @name "Right Click Block" and "Select Block" Blocker
  3. // @version 0.1
  4. // @description Block the right click and mouse select blockers.
  5. // @author ekin@gmx.us
  6. // @include http://*/*
  7. // @include https://*/*
  8. // @grant none
  9. // @namespace https://greasyfork.org/users/6473
  10. // ==/UserScript==
  11.  
  12. window.onload = function() {
  13. document.oncontextmenu=true;
  14. if(jQuery) {
  15. jQuery(document).unbind('contextmenu');
  16. }
  17. var css = "html, body {\
  18. -webkit-touch-callout: all !important;\
  19. -webkit-user-select: all !important;\
  20. -khtml-user-select: all !important;\
  21. -moz-user-select: all !important;\
  22. -ms-user-select: all !important;\
  23. user-select: all !important;\
  24. }";
  25. var head = document.head || document.getElementsByTagName('head')[0];
  26. var style = document.createElement('style');
  27. style.type = 'text/css';
  28. if (style.styleSheet){
  29. style.styleSheet.cssText = css;
  30. } else {
  31. style.appendChild(document.createTextNode(css));
  32. }
  33. head.appendChild(style);
  34. };