网页强制复制

右键强力解锁,可以复制一些网站的免费章节或者特殊文字

اعتبارا من 03-04-2015. شاهد أحدث إصدار.

  1. // ==UserScript==
  2. // @name 网页强制复制
  3. // @namespace http://googlo.me/
  4. // @author 无法诉说的吟荡
  5. // @icon http://googlo.me/favicon.ico
  6. // @version 3.3
  7. // @description 右键强力解锁,可以复制一些网站的免费章节或者特殊文字
  8. // @homepage https://greasyfork.org/zh-CN/scripts/218
  9. // @include *
  10. // @grant unsafeWindow
  11. // @require http://libs.baidu.com/jquery/2.0.0/jquery.min.js
  12.  
  13. // ==/UserScript==
  14. function restore(){
  15. with (document.wrappedJSObject || document) {
  16. onmouseup = null;
  17. onmousedown = null;
  18. oncontextmenu = null;
  19. }
  20. var arAllElements = document.getElementsByTagName('*');
  21. for (var i = arAllElements.length - 1; i >= 0; i--) {
  22. var elmOne = arAllElements[i];
  23. with (elmOne.wrappedJSObject || elmOne) {
  24. onmouseup = null;
  25. onmousedown = null;
  26. }
  27. }
  28. }
  29.  
  30. window.addEventListener('load',restore,true);
  31.  
  32. function addGlobalStyle(css) {
  33. var head, style;
  34. head = document.getElementsByTagName('head')[0];
  35. if (!head) { return; }
  36. style = document.createElement('style');
  37. style.type = 'text/css';
  38. style.innerHTML = css;
  39. head.appendChild(style);
  40. }
  41.  
  42. addGlobalStyle("html, * {-moz-user-select:text!important;}");