Remover

With this Script you can edit every Website.

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

  1. // ==UserScript==
  2. // @version 5.1.2.2
  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. // @grant GM_notification
  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. // @noframes
  19. // @contributionURL https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=joshua.sch98@gmail.com&item_name=Greasyfork:+Remover&amount=5.5
  20. // @contributionAmount $5,50
  21. // ==/UserScript==
  22.  
  23. // ==META==
  24. GM_xmlhttpRequest({
  25. method: 'GET',
  26. url: GM_info.script.namespace + "/code.meta.js",
  27. onload: function(readMeta) {
  28. unsafeWindow.getMeta = function() {
  29. var metaCode = readMeta.response;
  30. if (metaCode.indexOf(GM_info.script.version) > -1) { // nothing
  31. } else {
  32. var metaVersionCode = metaCode.substring(metaCode.indexOf(GM_info.script.version) + 31, +37);
  33. if (metaVersionCode > GM_info.script.version) {
  34. console.warn("Please download version " + metaVersionCode + " " + GM_info.script.namespace + "/code.user.js");
  35. GM_notification({
  36. title: "Update",
  37. text: "Please download version " + metaVersionCode,
  38. onclick: function() {location.href=GM_info.script.namespace + "/code.user.js";},
  39. });
  40. }
  41. }
  42. };
  43. }
  44. });
  45. // ==============
  46.  
  47. // ==VAR==
  48. var jslink = "javascript";
  49. var start = "<div id='button'><a href='javascript:on()'>Start</a></div>";
  50. var work = "<a onMouseout='off()'>" + GM_info.script.name + " v" + GM_info.script.version + " is on!</a><span> <--- Mouseover to Stop.</span>";
  51. // ==============
  52.  
  53. // ==START FUNCTION==
  54. body = document.body;
  55. if (body !== null) {
  56. div1 = document.createElement("div");
  57. div1.setAttribute('id', 'first');
  58. div1.style.position = "fixed";
  59. div1.style.top = "0px";
  60. div1.style.right = "0px";
  61. div1.style.zIndex = "9999";
  62. div1.style.backgroundColor = "red";
  63. div1.style.opacity = 0.90;
  64. div1.style.border = "1px solid #ffffcc";
  65. div1.style.padding = "3px";
  66. div1.innerHTML = start;
  67. body.appendChild(div1);
  68. }
  69. unsafeWindow.on = function() {
  70. getMeta();
  71. location.href = jslink + ":document.body.contentEditable='true'; document.designMode='on'; void 0";
  72. document.getElementById("hide").style.visibility = "visible";
  73. document.getElementById("first").style.left = "0px";
  74. document.getElementById('button').innerHTML = work;
  75. document.title = "► " + GM_info.script.name + " v" + GM_info.script.version + " is on!";
  76. var link = document.createElement('link');
  77. link.type = 'image/x-icon';
  78. link.rel = 'shortcut icon';
  79. link.href = GM_info.script.icon;
  80. document.getElementsByTagName('head')[0].appendChild(link);
  81. console.info(GM_info.script.name + " v" + GM_info.script.version + " is on!\nCopyright: " + GM_info.script.copyright);
  82. 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/).");
  83. };
  84. // ==============
  85.  
  86. // ==HIDE BUTTON==
  87. body = document.body;
  88. if (body !== null) {
  89. div2 = document.createElement("div");
  90. div2.setAttribute('id', 'hide');
  91. div2.style.position = "fixed";
  92. div2.style.top = "40px";
  93. div2.style.right = "0px";
  94. div2.style.zIndex = "9999";
  95. div2.style.opacity = 0.90;
  96. div2.style.visibility = "hidden";
  97. div2.innerHTML = "<img onMouseout='hideload()' src='http://fs2.directupload.net/images/150909/sxcclyoz.png'>";
  98. body.appendChild(div2);
  99. }
  100. unsafeWindow.hideload = function() {
  101. document.getElementById("hide").style.visibility = "hidden";
  102. document.getElementById("first").style.visibility = "hidden";
  103. document.getElementById("show").style.visibility = "visible";
  104. console.debug(GM_info.script.name + " toolbar is hidden!");
  105. };
  106. // ==============
  107.  
  108. // ==SHOW BUTTON==
  109. body = document.body;
  110. if (body !== null) {
  111. div3 = document.createElement("div");
  112. div3.setAttribute('id', 'show');
  113. div3.style.position = "fixed";
  114. div3.style.top = "0px";
  115. div3.style.right = "0px";
  116. div3.style.zIndex = "9999";
  117. div3.style.opacity = 0.90;
  118. div3.style.visibility = "hidden";
  119. div3.innerHTML = "<img onMouseout='showload()' src='http://fs2.directupload.net/images/150909/7tae9l8k.png'>";
  120. body.appendChild(div3);
  121. }
  122. unsafeWindow.showload = function() {
  123. document.getElementById("show").style.visibility = "hidden";
  124. document.getElementById("first").style.visibility = "visible";
  125. document.getElementById("hide").style.visibility = "visible";
  126. console.debug(GM_info.script.name + " toolbar is visible!");
  127. };
  128. // ==============
  129.  
  130. // ==STOP FUNCTION==
  131. unsafeWindow.off = function() {
  132. location.href = jslink + ":document.body.contentEditable='false'; document.designMode='off'; void 0";
  133. document.getElementsByTagName("title")[0].firstChild.data = GM_info.script.name + " is off!";
  134. console.info(GM_info.script.name + " is off!");
  135. document.getElementById('button').innerHTML = "<span>" + GM_info.script.name + " is off!</span>";
  136. document.getElementById('first').style.left = null;
  137. document.getElementById('first').style.right = "0px";
  138. };
  139. // ==============