Greasy Fork 支持简体中文。

Greasemonkey test style

If you install this and all text turns red, Greasemonkey (or equivalent) is working.

目前為 2014-02-18 提交的版本,檢視 最新版本

  1. // ==UserScript==
  2. // @name Greasemonkey test style
  3. // @namespace http://userstyles.org
  4. // @description If you install this and all text turns red, Greasemonkey (or equivalent) is working.
  5. // @author JasonBarnabe
  6. // @homepage http://greasyfork.org/scripts/1
  7. // @run-at document-start
  8. // @version 1.20140218195221
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. var css = "*{ color: red !important; }";
  13. if (typeof GM_addStyle != "undefined") {
  14. GM_addStyle(css);
  15. } else if (typeof PRO_addStyle != "undefined") {
  16. PRO_addStyle(css);
  17. } else if (typeof addStyle != "undefined") {
  18. addStyle(css);
  19. } else {
  20. var node = document.createElement("style");
  21. node.type = "text/css";
  22. node.appendChild(document.createTextNode(css));
  23. var heads = document.getElementsByTagName("head");
  24. if (heads.length > 0) {
  25. heads[0].appendChild(node);
  26. } else {
  27. // no head yet, stick it whereever
  28. document.documentElement.appendChild(node);
  29. }
  30. }
  31. })();