Ru-Board_Extrim_Max4_ABP_Fix-CSS

Дополнение, исправляющее работу Adblock Plus для форума Ru-Board. Экстремальная часть функционала Ad-Охотника в Maxthon4 и Maxthon5.

  1. // ==UserScript==
  2. // @name Ru-Board_Extrim_Max4_ABP_Fix-CSS
  3. // @namespace https://greasyfork.org
  4. // @description Дополнение, исправляющее работу Adblock Plus для форума Ru-Board. Экстремальная часть функционала Ad-Охотника в Maxthon4 и Maxthon5.
  5. // @author ALeXkRU
  6. // @homepage https://greasyfork.org/ru/scripts/8245-ru-board-extrim-max4-abp-fix-css
  7. // @icon http://forum.ru-board.com/favicon.ico
  8. // @include http://forum.ru-board.com/*
  9. // @include http*://178.17.165.22/*
  10. // @include http://latestnewsofusa.org/*
  11. // @run-at document-start
  12. // @license CC BY-SA
  13. // @version 0.20181220200003
  14. // @grant GM_addStyle
  15. // ==/UserScript==
  16. // -!! для ВКЛючения фильтра В НАЧАЛЕ СТРОКИ убрать символы // ! (два слэша, пробел, восклицательный знак)
  17. // -!! для ОТКЛючения фильтра перед строкой поставить // ! (два слэша, пробел, восклицательный знак)
  18. // -!!
  19. // -!! строки, начинающиеся с пробелов и знаков // -!! это комментарии. Их НЕ ТРОГАТЬ!!
  20. // -!!
  21. // -!! ===============================================================================
  22. (function() {var css = "";
  23. css += [
  24. "@namespace url(http://www.w3.org/1999/xhtml);",
  25. "",
  26. "/* Фильтры фоновых картинок */"
  27. ].join("\n");
  28. if (false || (document.domain == "ru-board.com" || document.domain.substring(document.domain.indexOf(".ru-board.com") + 1) == "ru-board.com") || (document.domain == "latestnewsofusa.org" || document.domain.substring(document.domain.indexOf(".latestnewsofusa.org") + 1) == "latestnewsofusa.org"))
  29. css += [
  30. // -!! для ВКЛючения фильтра В НАЧАЛЕ СТРОКИ убрать символы // ! (два слэша, пробел, восклицательный знак)
  31. // -!! для ОТКЛючения фильтра перед строкой поставить // ! (два слэша, пробел, восклицательный знак)
  32. // -!!
  33. // -!! ======= ПРАВКА СТРУКТУРЫ =======
  34. // -!!
  35. // -!! смещаем логотип Ru-Board вниз, на уровень верхнего меню
  36. // -!!! не работает вместе с вытянутым в строку меню!!
  37. " img[src=\"http://forum.ru-board.com/board/images/remake1.gif\"]{position: absolute!important; top:0px!important;}",
  38. " img[src=\"http://forum.ru-board.com/board/images/ru-board_ny_new.gif\"]{position: absolute!important; top:0px!important;}",
  39. " img[src=\"http://i.ru-board.com/images/remake1.gif\"]{position: absolute!important; top:0px!important;}",
  40. " img[src=\"http://i.ru-board.com/images/ru-board_ny_new.gif\"]{position: absolute!important; top:0px!important;}",
  41. // -!! ОБЛАГОРАЖИВАЕМ ВИД
  42. // -!! верхнее меню -> в одну строку (требует правило в АВР)
  43. // -!! " ##body>table:nth-of-type(2)>tbody>tr>td.sh1> br",
  44. // ! " body>table:nth-of-type(2)>tbody>tr>td.sh1>a:nth-of-type(2)::after{content:\" • \";color:#000000!important;}",
  45. // ! " body>table:nth-of-type(2)>tbody>tr>td.sh1>a:nth-of-type(5)::after{content:\" • \";color:#000000!important;}",
  46. // -!! ширина колонки с никами/аватарами. Значение (10% - 12%) зависит от разрешения монитора!
  47. " table.tb td[class=\"dats\"] {width: 10% !important}",
  48. // -!! обрезка длинных имён и титлов (при наведении курсора имя будет видно полностью)
  49. // ! " a.m> b {width: 6em !important; display: inline-block !important; overflow: hidden !important;}",
  50. // ! " a.m> b:hover {overflow: visible !important;}",
  51. // -!! затеняем часть элементов вокруг поста
  52. " td.tpc:first-line, td.tpc> a.tpc, td.bottomline, span.tpc, a.tpc {color: #9C9C9C!important;}",
  53. " hr[size=\"1\"][width=\"100%\"][color=\"#9C9C9C\"]{visibility: hidden !important;}",
  54. // -!! затеняем подпись
  55. " table[class=\"sing\"] a,table[class=\"sing\"] td {color: #9C9C9C!important;}",
  56. // -!! затеняем список страниц и меню возврата при просмотре одного сообщения
  57. " td.small a {font-size: 8px !important;color: #9C9C9C !important;}",
  58. " td.small b {color: #9C9C9C !important;border-color: #9C9C9C !important;border-style: solid !important;border-top-width: 2px !important;border-right-width: 2px !important;border-bottom-width: 2px !important;border-left-width: 2px !important;}",
  59. // -!! !! =====================================
  60. // -!! ЭКСТРИМ!! (желающие раскомментируют нужное.. ПРАВИЛА МОГУТ РАБОТАТЬ НЕКОРРЕКТНО!
  61. // -!! !! =====================================
  62. // -!! первый пост/шапка свёрнут - "СПОЙЛЕР" от Zakkazak
  63. // ! " body>script+table.tb>tbody>tr>td>table>tbody>tr:first-of-type{position: relative !important; display: block !important; height: 2em !important;width: 16em !important; overflow: auto !important; border-color: SlateGrey !important; border-style: solid !important;border-width: 4px !important;}",
  64. // ! " body>script+table.tb>tbody>tr>td>table>tbody>tr:first-of-type:hover {height: 70em !important; width: auto !important;} ", // ! сам спойлер
  65. // ! " body>script+table.tb td.tpc {position: absolute !important;}",
  66. // ! " body>script+table.tb>tbody>tr>td>table::before {content: \"СПОЙЛЕР! Сообщение скрыто. Навести курсор для просмотра содержимого \"; color:#DA1006!important;}",
  67. // -!! первый пост во всю ширину экрана !! НЕ ВИДЕН АВТОР поста/шапки!
  68. // ! " body>script+table.tb td.dats {display: none;}",
  69. // -!! уменьшаем размер изображений в шапке
  70. " body>script+table.tb td.tpc img {max-height: 35px !important;}",
  71. // -!! и возвращаем при наведении курсора
  72. " body>script+table.tb td.tpc img:hover {max-height: 100% !important;}",
  73. // -!! подсветка и предупреждение о рекламных ссылках (СПАМ) в сообщениях
  74. // -!! скрываем ссылку и подчеркиваем пунктиром
  75. // ! " a[href^=\"http://forum.ru-board.com/\"][href$=\"/\"][target=\"_blank\"]{color:#333!important; text-decoration: none; border-bottom: 1px dashed #333 !important;}",
  76. // ! " a[href^=\"https://forum.ru-board.com/\"][href$=\"/\"][target=\"_blank\"]{color:#333!important; text-decoration: none; border-bottom: 1px dashed #333 !important;}",
  77. // -!! выделяем СПАМ-ссылку сиреневым цветом
  78. " a[href^=\"http://forum.ru-board.com/\"][href$=\"/\"][target=\"_blank\"]{color:#DA70D6!important;}",
  79. " a[href^=\"https://forum.ru-board.com/\"][href$=\"/\"][target=\"_blank\"]{color:#DA70D6!important;}",
  80. // -!! добавляем предупреждение о СПАМ-ссылке
  81. // ! " a[href^=\"http://forum.ru-board.com/\"][href$=\"/\"][target=\"_blank\"]:after {content: \" ( !!!СПАМ-ссылка! ОСТОРОЖНО! ..ваш Ad-Охотник)\"; color:#DA70D6!important;}",
  82. // ! " a[href^=\"https://forum.ru-board.com/\"][href$=\"/\"][target=\"_blank\"]:after {content: \" ( !!!СПАМ-ссылка! ОСТОРОЖНО! ..ваш Ad-Охотник)\"; color:#DA70D6!important;}",
  83. // -!! изменить размер шрифта на странице
  84. // ! " *{font-size: 12pt!important}",
  85. // -!! включаем подпись
  86. // ! " input[name=\"signature\"]{color:#003399!important;\"checked\" !important;}",
  87. // -!! игнор-лист: копируем строку, заменяем НИК_в_ИГНОР, удаляем ! -воскл.знак- в начале
  88. // -!! ! a.tpc[href$="НИК_в_ИГНОР"] ~ .post",
  89. // -!! НОСТАЛЬГИЯ (как в Maxthon2 + плагин R2)
  90. // -!! стиль поля ввода
  91. " textarea{background-color:#003399!important;color:#FFFFFF!important;font-weight:bold!important;}",
  92. // -!! размер поля ввода
  93. " textarea{height: 364px!important;width: 948px!important;}",
  94. // -!! следующую строку НЕ ТРОГАТЬ!
  95. " "
  96. // -!! === конец фильтра ===
  97. // -!!
  98. // -!! дальше - ничего не менять
  99. // -!!
  100. ].join("\n");
  101. if (typeof GM_addStyle != "undefined") {
  102. GM_addStyle(css);
  103. } else if (typeof PRO_addStyle != "undefined") {
  104. PRO_addStyle(css);
  105. } else if (typeof addStyle != "undefined") {
  106. addStyle(css);
  107. } else {
  108. var node = document.createElement("style");
  109. node.type = "text/css";
  110. node.appendChild(document.createTextNode(css));
  111. var heads = document.getElementsByTagName("head");
  112. if (heads.length > 0) {
  113. heads[0].appendChild(node);
  114. } else {
  115. // no head yet, stick it whereever
  116. document.documentElement.appendChild(node);
  117. }
  118. }
  119. })();