Remover

With this Script you can edit every Website.

当前为 2016-08-08 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @version 5.1.1.8
  3. // @name Remover
  4. // @namespace https://greasyfork.org/scripts/4612
  5. // @description With this Script you can edit every Website.
  6. // @description:de Mit diesem Skript können sie jede beliebige Website bearbeiten.
  7. // @author Scriptz
  8. // @copyright 2013+ , Scriptz
  9. // @include *://*
  10. // @icon http://file1.npage.de/007324/77/bilder/favicon.ico
  11. // @priority 9999
  12. // @grant unsafeWindow
  13. // @grant GM_xmlhttpRequest
  14. // @connect *
  15. // @supportURL mailto:scriptz@mail1a.de?subject=Remover
  16. // @license Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License; http://creativecommons.org/licenses/by-nc-nd/3.0/
  17. // ==/UserScript==
  18.  
  19. // ==META==
  20. GM_xmlhttpRequest({
  21. method: 'GET',
  22. url: GM_info.script.namespace+"/code.meta.js",
  23. onload: function(readMeta) {
  24. unsafeWindow.xml = function() {
  25. var metaCode = readMeta.response;
  26. if(metaCode.indexOf(GM_info.script.version) > -1) {// nothing
  27. } else {
  28. var metaVersionCode = metaCode.substring(metaCode.indexOf(GM_info.script.version) +31, +37);
  29. if(metaVersionCode > GM_info.script.version) {
  30. console.warn("Please download version " +metaVersionCode+" "+GM_info.script.namespace+"/code.user.js");
  31. }
  32. }
  33. };
  34. }
  35. });
  36. // ==============
  37.  
  38. // ==VAR==
  39. var jslink = "javascript";
  40. var work = "<a onMouseout='load()'>"+GM_info.script.name+" v"+GM_info.script.version+" is on!</a><span> <--- Mouseover to Stop.</span>";
  41. var stopped = "<span>"+GM_info.script.name+" is off!</span>";
  42. // ==============
  43.  
  44. // ==START FUNCTION==
  45. body = document.body;
  46. if(body !== null) {
  47. div1 = document.createElement("div");
  48. div1.setAttribute('id','first');
  49. div1.style.position = "fixed";
  50. div1.style.top = "0px";
  51. div1.style.right = "0px";
  52. div1.style.zIndex = "9999";
  53. div1.style.backgroundColor = "red";
  54. div1.style.opacity = 0.90;
  55. div1.style.border = "1px solid #ffffcc";
  56. div1.style.padding = "3px";
  57. div1.innerHTML = "<div id='button'><a href='javascript:on()'>Start</a></div>";
  58. body.appendChild(div1);
  59. }
  60. unsafeWindow.on = function() {
  61. document.getElementById("hide").style.visibility='visible';
  62. document.getElementById('first').style.left = "0px";
  63. document.title = "► "+GM_info.script.name+" v"+GM_info.script.version+" is on!";
  64. (function() {
  65. var link = document.createElement('link');
  66. link.type = 'image/x-icon';
  67. link.rel = 'shortcut icon';
  68. link.href = GM_info.script.icon;
  69. document.getElementsByTagName('head')[0].appendChild(link);
  70. }());
  71. location.href=jslink+":document.body.contentEditable='true'; document.designMode='on'; void 0";
  72. xml();
  73. document.getElementById('button').innerHTML = work;
  74. console.info(GM_info.script.name+" v"+GM_info.script.version+" is on!\nCopyright: "+GM_info.script.copyright);
  75. console.warn(GM_info.script.name+" by "+GM_info.script.author+" is licensed under a [Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License](http://creativecommons.org/licenses/by-nc-nd/3.0/).");
  76. };
  77. // ==============
  78.  
  79. // ==HIDE BUTTON==
  80. body = document.body;
  81. if(body !== null) {
  82. div2 = document.createElement("div");
  83. div2.setAttribute('id','hide');
  84. div2.style.position = "fixed";
  85. div2.style.top = "40px";
  86. div2.style.right = "0px";
  87. div2.style.zIndex = "9999";
  88. div2.style.opacity = 0.90;
  89. div2.style.visibility ="hidden";
  90. div2.innerHTML = "<div id='img'><img onMouseout='imgload()' src='http://fs2.directupload.net/images/150909/sxcclyoz.png'></div>";
  91. body.appendChild(div2);
  92. }
  93. unsafeWindow.imgload = function() {
  94. document.getElementById("hide").style.visibility='hidden';
  95. document.getElementById("first").style.visibility='hidden';
  96. document.getElementById("show").style.visibility='visible';
  97. console.debug(GM_info.script.name+" toolbar is hidden!");
  98. };
  99. // ==============
  100.  
  101. // ==SHOW BUTTON==
  102. body = document.body;
  103. if(body !== null) {
  104. div3 = document.createElement("div");
  105. div3.setAttribute('id','show');
  106. div3.style.position = "fixed";
  107. div3.style.top = "0px";
  108. div3.style.right = "0px";
  109. div3.style.zIndex = "9999";
  110. div3.style.opacity = 0.90;
  111. div3.style.visibility ="hidden";
  112. div3.innerHTML = "<div id='img'><img onMouseout='loadone()' src='http://fs2.directupload.net/images/150909/7tae9l8k.png'></div>";
  113. body.appendChild(div3);
  114. }
  115. unsafeWindow.loadone = function() {
  116. document.getElementById("show").style.visibility='hidden';
  117. document.getElementById("first").style.visibility='visible';
  118. document.getElementById("hide").style.visibility='visible';
  119. console.debug(GM_info.script.name+" toolbar is visible!");
  120. };
  121. // ==============
  122.  
  123. // ==STOP FUNCTION==
  124. unsafeWindow.load = function() {
  125. document.getElementsByTagName("title")[0].firstChild.data = GM_info.script.name+" is off!";
  126. location.href=jslink+":document.body.contentEditable='false'; document.designMode='off'; void 0";
  127. document.getElementById('button').innerHTML = stopped;
  128. console.info(GM_info.script.name+" is off!");
  129. };
  130. // ==============