Remover

With this Script you can edit every Website.

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

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