spoiler-img

2ch.hk.

  1. // ==UserScript==
  2. // @name spoiler-img
  3. // @namespace http://userstyles.org
  4. // @description 2ch.hk.
  5. // @author xsdsadxdsa
  6. // @match https://2ch.hk/*
  7. // @homepage https://greasyfork.org/ru/scripts/512903-spoiler-img
  8. // @run-at 0
  9. // @version 0.1
  10. // ==/UserScript==
  11. (function() {var css = "";
  12. if (false || (new RegExp("^http(|s)://(|www.)2(|-)ch.(so|ru|hk|ec|pm|re|tf|wf|yt|life).*$")).test(document.location.href))
  13. css += [
  14. "@namespace url(http://www.w3.org/1999/xhtml);",
  15. "/* your code goes here */",
  16. "/*@-moz-document regexp(\"http(|s)://(|www.)2(|-)ch\\.(so|ru|hk|life|ec|pm|re|tf|wf|yt).*\")*/ ",
  17. ".rmenu.desktop, .board-info, .board-banner, #de-main hr, hr.pre-rekl, .passcode-banner.desktop, .rekl, .news, .top-user-boards{",
  18. " display: none !important;",
  19. "}",
  20. " ",
  21. ".ctlg__thread img:hover {",
  22. " opacity: 1;",
  23. "}",
  24. ".ctlg__thread img {",
  25. " opacity: 0.12;",
  26. "}",
  27. ".post__image-link {",
  28. " opacity: 0.33;",
  29. "}",
  30. ".mv__meta {",
  31. " opacity: 1;",
  32. "}"
  33. ].join("\n");
  34. if (typeof GM_addStyle != "undefined") {
  35. GM_addStyle(css);
  36. } else if (typeof PRO_addStyle != "undefined") {
  37. PRO_addStyle(css);
  38. } else if (typeof addStyle != "undefined") {
  39. addStyle(css);
  40. } else {
  41. var node = document.createElement("style");
  42. node.type = "text/css";
  43. node.appendChild(document.createTextNode(css));
  44. var heads = document.getElementsByTagName("head");
  45. if (heads.length > 0) {
  46. heads[0].appendChild(node);
  47. } else {
  48. // no head yet, stick it whereever
  49. document.documentElement.appendChild(node);
  50. }
  51. }
  52. })();