Remover

With this Script you can edit every Website.

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

  1. // ==UserScript==
  2. // @version 5.1.1.5
  3. // @name Remover
  4. // @name:de Entferner
  5. // @namespace https://greasyfork.org/scripts/4612-remover/
  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. unsafeWindow.xml = function() {
  26. var metaCode = readMeta.response;
  27. if(metaCode.indexOf(GM_info.script.version) > -1) {// nothing
  28. } else {
  29. var metaVersionCode = metaCode.substring(metaCode.indexOf(GM_info.script.version) +31, +37);
  30. if(metaVersionCode > GM_info.script.version) {
  31. console.warn("Please download version " +metaVersionCode+" "+GM_info.script.namespace+"code/"+GM_info.script.name+".user.js");
  32. }
  33. }
  34. };
  35. }
  36. });
  37. // ==============
  38.  
  39. // ==VAR==
  40. var jslink = "javascript";
  41. 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>";
  42. var stopped = "<span class='158704'>"+GM_info.script.name+" is off!</span>";
  43. // ==============
  44.  
  45. // ==START FUNCTION==
  46. body = document.body;
  47. if(body !== null) {
  48. div1 = document.createElement("div");
  49. div1.setAttribute('id','first');
  50. div1.style.position = "fixed";
  51. div1.style.top = "0px";
  52. div1.style.right = "0px";
  53. div1.style.zIndex = "9999";
  54. div1.style.backgroundColor = "red";
  55. div1.style.opacity = 0.90;
  56. div1.style.border = "1px solid #ffffcc";
  57. div1.style.padding = "3px";
  58. div1.innerHTML = "<div id='button'><a class='158704' href='javascript:on()'>Start</a></div>";
  59. body.appendChild(div1);
  60. }
  61. unsafeWindow.on = function() {
  62. document.getElementById("hide").style.visibility='visible';
  63. document.getElementById('first').style.left = "0px";
  64. document.getElementsByTagName("title")[0].firstChild.data = "► "+GM_info.script.name+" v"+GM_info.script.version+" is on!";
  65. (function() {
  66. var link = document.createElement('link');
  67. link.type = 'image/x-icon';
  68. link.rel = 'shortcut icon';
  69. link.href = GM_info.script.icon;
  70. document.getElementsByTagName('head')[0].appendChild(link);
  71. }());
  72. location.href=jslink+":document.body.contentEditable='true'; document.designMode='on'; void 0";
  73. xml();
  74. document.getElementById('button').innerHTML = work;
  75. console.info(GM_info.script.name+" v"+GM_info.script.version+" is on!\nCopyright: "+GM_info.script.copyright);
  76. 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/).");
  77. };
  78. // ==============
  79.  
  80. // ==HIDE BUTTON==
  81. body = document.body;
  82. if(body !== null) {
  83. div2 = document.createElement("div");
  84. div2.setAttribute('id','hide');
  85. div2.style.position = "fixed";
  86. div2.style.top = "40px";
  87. div2.style.right = "0px";
  88. div2.style.zIndex = "9999";
  89. div2.style.opacity = 0.90;
  90. div2.style.visibility ="hidden";
  91. div2.innerHTML = "<div id='img'><img onMouseout='imgload()' src='http://fs2.directupload.net/images/150909/sxcclyoz.png'></div>";
  92. body.appendChild(div2);
  93. }
  94. unsafeWindow.imgload = function() {
  95. document.getElementById("hide").style.visibility='hidden';
  96. document.getElementById("first").style.visibility='hidden';
  97. document.getElementById("show").style.visibility='visible';
  98. console.debug(GM_info.script.name+" toolbar is hidden!");
  99. };
  100. // ==============
  101.  
  102. // ==SHOW BUTTON==
  103. body = document.body;
  104. if(body !== null) {
  105. div3 = document.createElement("div");
  106. div3.setAttribute('id','show');
  107. div3.style.position = "fixed";
  108. div3.style.top = "0px";
  109. div3.style.right = "0px";
  110. div3.style.zIndex = "9999";
  111. div3.style.opacity = 0.90;
  112. div3.style.visibility ="hidden";
  113. div3.innerHTML = "<div id='img'><img onMouseout='loadone()' src='http://fs2.directupload.net/images/150909/7tae9l8k.png'></div>";
  114. body.appendChild(div3);
  115. }
  116. unsafeWindow.loadone = function() {
  117. document.getElementById("show").style.visibility='hidden';
  118. document.getElementById("first").style.visibility='visible';
  119. document.getElementById("hide").style.visibility='visible';
  120. console.debug(GM_info.script.name+" toolbar is visible!");
  121. };
  122. // ==============
  123.  
  124. // ==STOP FUNCTION==
  125. unsafeWindow.load = function() {
  126. document.getElementsByTagName("title")[0].firstChild.data = GM_info.script.name+" is off!";
  127. location.href=jslink+":document.body.contentEditable='false'; document.designMode='off'; void 0";
  128. document.getElementById('button').innerHTML = stopped;
  129. console.info(GM_info.script.name+" is off!");
  130. };
  131. // ==============