Eclipse

Dark theme for EVERTHING

  1. // ==UserScript==
  2. // @name Eclipse
  3. // @namespace http://yeoxingyee.ml/
  4. // @description Dark theme for EVERTHING
  5. // @author stormi, Nayu
  6. // @homepage https://userstyles.org/styles/31267
  7. // @run-at document-start
  8. // @include *
  9. // @exclude *://docs.google.com/*
  10. // @exclude *://drive.google.com/*
  11. // @version 2.0~beta1
  12. // Note: This is a modified version of the userstyle to suit people who don't really like true dark. Original code belongs to stormi, I'm just making the edits :P
  13. // ==/UserScript==
  14. (function() {var css = "";
  15. if (false || (new RegExp("^https?://(?!(www.your-sites-here.com|forum.example.com)).*$")).test(document.location.href) || (document.location.href.indexOf("ftp://") == 0) || (document.location.href.indexOf("file://") == 0) || (document.location.href.indexOf("about") == 0) || (document.location.href.indexOf("javascript") == 0))
  16. css += [
  17. "html {background: ",
  18. "",
  19. " /***** COPY AND PASTE THE URL OF YOUR BACKROUND-IMAGE INSIDE THE url(\"\") *****/",
  20. "",
  21. "",
  22. // " url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANAAAAC4AgMAAADvbYrQAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAAAJUExURQwMDA8PDxISEkrSJjgAAAVcSURBVGjevZqxjtwwDETZTOOvm2Yafp0aNvzKFJRsade3ycqHLA4IcMo70LRIDsk1iDZ/0P8VbTmAZGZmpGiejaBECpLcIUH0DAUpSpIgHZkuSfTchaIJBtk4ggTJnVL94DzJkJjZNqFsECUDjwhEQpKUyXAKExSHh0T3bYgASSNn8zLpomSSSYg4Mo58BEEETaz3N35OL3SoW0iREvcgAyHzGKfoEN4g1t+qS7UBlR2ZLfO8L5J0WQh3KOABybNJfADpDfIol88vF1I6n0Ev5kFyUWodCoSOCIgfnumfoVigk1CkQpCQAVG+D/VMAuuJQ+hXij2RaCQW1lWY0s93UGaTCCFTw7bziSvyM4/MI/pJZtuHnKIy5TmCkJ4tev7qUKZSDyFXQX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nXnVHwzIZkf4NkTJlF0kesylpoIwZOybQMPliG+hGmuZGfEyP3WRNdbCuVDqV+tnqGr8PXTtlY1LARgrxt4ZD+kj8SPEv0MobQvxGKp3qJ9zR/IImiWBrRrtzjz7K4QfoPHEBhquXOUTFJd5lXL2IIyXu07UMaA+5MKSez5AnCZjb9Cc6X3xLUdO5jDcGTVj+R4aY+e5u5Iou/5WrWYjIGW0zLYHnYlFOnSpjLmoRcxF7QFkA5rME+dlfUA6ukhs7tvQ7Ai/M29Z/dDFPeg/byRXOxykJM96xZimqhJ5r5Z3oP61AHo2aCSbCeLvQTFB8xd6xmL4t6BjQF1i/zp0tg31PY0OmY1taUFYHfEV9K/7x/nzB/aTFFDPHGpXAAAAAElFTkSuQmCC\")",
  23. "",
  24. " /***** FOR A SIMPLE BLACK BACKGROUND JUST REMOVE THE URL LINE ABOVE *****/",
  25. " /***** Some background-images (you can also use your own url):",
  26. "",
  27. " default: https://abload.de/img/bg_digital94uzx.png",
  28. " old default1: https://abload.de/img/b1fgs11.png",
  29. " old default2: https://abload.de/img/ultra_x2vm9k.jpg",
  30. " https://abload.de/img/b2w4shd.png",
  31. " https://abload.de/img/b3qrs99.png",
  32. " https://abload.de/img/b4zcse8.png",
  33. " https://abload.de/img/b5b1s7x.png",
  34. " https://abload.de/img/b6umsmy.png",
  35. " https://abload.de/img/b7ars8c.png",
  36. " https://abload.de/img/kubrickbgcolor2darkr8skc.png",
  37. " https://abload.de/img/xpattern_darkq8s3i.png",
  38. " https://abload.de/img/mainpatternolxcq.png",
  39. "",
  40. "*/ #2f2f2f /* fixed */ !important}",
  41. "",
  42. "",
  43. "/*----- DEFAULT TEXT, BORDER & BACKGROUND COLORS -----*/",
  44. "* {",
  45. " color: #999 !important;",
  46. " text-shadow: 0 0 3px #000 !important;",
  47. " box-shadow: none !important;",
  48. " background-color: transparent !important;",
  49. " border-color: #444 !important;",
  50. " border-top-color: #444 !important;",
  51. " border-bottom-color: #444 !important;",
  52. " border-left-color: #444 !important;",
  53. " border-right-color: #444 !important}",
  54. "body {background: transparent !important}",
  55. "*:before, *:after {background-color: transparent !important; border-color: #444 !important}",
  56. "",
  57. "a, a * {",
  58. " color: #409B9B !important;",
  59. " text-decoration: none !important}",
  60. "a:hover, a:hover *, a:visited:hover, a:visited:hover *, span[onclick]:hover, div[onclick]:hover, [role=\"link\"]:hover, [role=\"link\"]:hover *, [role=\"button\"]:hover *, [role=\"menuitem\"]:hover, [role=\"menuitem\"]:hover *, .link:hover, .link:hover * {",
  61. " color: #F0F0F0 !important;",
  62. " text-shadow: 0 0 5px rgba(255,255,200,0.9) !important}",
  63. "a:visited, a:visited * {",
  64. " color: #607069 !important}",
  65. "a.highlight, a.highlight *, a.active, a.active *, .selected, .selected *, [href=\"#\"] {",
  66. " color: #DDD !important;",
  67. " font-weight: bold !important}",
  68. "",
  69. "h1, h2, h3, h4, h5, h6, h1 *, h2 *, h3 *, strong, [id*=\"headline\"], [class*=\"headline\"], [id*=\"header\"], [class*=\"header\"], [class*=\"header\"] td {",
  70. " color: #DDD !important}",
  71. "a h1, a h2, a h3, a h4, a h5, a h6, h1 a, h2 a, h3 a, a strong, a[id*=\"headline\"], a[class*=\"headline\"], a[id*=\"header\"], a[class*=\"header\"] {",
  72. " text-decoration: underline !important}",
  73. "[class*=\"error\"], [class*=\"alert\"], code, span[onclick], div[onclick] {",
  74. " color: #900 !important}",
  75. "",
  76. "::-moz-selection {background: #377 !important; color: #000 !important}",
  77. "::selection {background: #377 !important; color: #000 !important}",
  78. ":focus {outline: none !important}",
  79. "",
  80. "",
  81. "/*----- MENU & CO BACKGROUND-COLORS -----*/",
  82. "div[style=\"display: block;\"], div[role=\"navigation\"] {background: rgba(0,0,0,.5) !important}",
  83. "",
  84. "table {",
  85. " background: rgba(40,30,30,.6) !important;",
  86. " border-radius: 6px !important}",
  87. "table > tbody > tr:nth-child(even), table > tbody > tr > td:nth-child(even) {",
  88. " background-color: rgba(0,0,0,.2) !important}",
  89. "",
  90. "iframe, embed, nav, label [onclick], nav ul, div[style*=\"position:\"][style*=\"left:\"][style*=\"visible\"], div[style*=\"z-index:\"][style*=\"left:\"][style*=\"visible\"], div[style*=\"-moz-user-select\"], div[role=\"menu\"], div[role=\"dialog\"], span[class*=\"script\"] div, [id*=\"menu\"], [id*=\"Menu\"], [class*=\"dropdown\"], [class*=\"popup\"], [class=\"title\"], ul[style*=\"display:\"], ul[style*=\"visibility:\"] ul, [id*=\"nav\"] ul, [class*=\"nav\"] ul, ul[class*=\"menu\"], a[onclick][style*=\"display\"], a[id*=\"ghosteryfirefox\"], #ghostery-purple-bubble, #translator-popup, .menu, .tooltip, .hovercard, .vbmenu_popup {",
  91. " background: rgba(5,5,5,.9) !important;",
  92. " border-radius: 5px;",
  93. " box-shadow: 1px 1px 5px #000 !important}",
  94. "header, #header, footer, #footer {",
  95. " background: rgba(19,19,19,.9) !important;",
  96. " box-shadow: 0 0 5px #000 !important}",
  97. "body > #dialog, body > .xenOverlay {",
  98. " background: rgba(19,19,19,.96) !important;",
  99. " background-clip: padding-box !important;",
  100. " box-shadow: 0 0 15px #000, inset 0 0 0 1px rgba(200,200,200,.5), inset 0 0 5px #111 !important;",
  101. " border: 10px solid rgba(99,99,99,.7) !important;",
  102. " border-radius: 0 !important;}",
  103. "[id*=\"overlay\"], [id*=\"lightbox\"], blockquote {",
  104. " background-color: rgba(35,35,35,.9) !important;",
  105. " border-radius: 5px}",
  106. "pre, dl, .Message code {",
  107. " background-color: rgba(5,5,5,.5) !important}",
  108. "",
  109. "",
  110. "/*----- DEFAULT BUTTONS, SEARCHBOXES & CO -----*/",
  111. "input, select, button, [role=\"button\"], a.button, a.submit, a.BigButton, a.TabLink, .install[onclick] {",
  112. " -moz-appearance: none !important;",
  113. " -webkit-appearance: none !important;",
  114. " transition: border-color 0.3s !important;",
  115. " background: #060606 !important;",
  116. " color: #BBB !important;",
  117. " text-shadow: 0 1px #000 !important;",
  118. " border: 2px solid #333 !important;",
  119. " border-radius: 4px !important;",
  120. " box-shadow: 0 0 2px rgba(0,0,0,.9) !important}",
  121. "a[href=\"javascript:;\"], a[class*=\"button\"]:not(:empty), a[id*=\"button\"]:not(:empty), a[id*=\"Button\"]:not(:empty), div[class*=\"button\"][onclick] {",
  122. " transition: border-color 0.3s !important;",
  123. " background: #060606 !important;",
  124. " color: #BBB !important;",
  125. " text-shadow: 0 1px #000 !important;",
  126. " border-color: #333 !important;",
  127. " box-shadow: 0 0 2px rgba(0,0,0,.9) !important}",
  128. "a[href=\"javascript:;\"]:hover, a[class*=\"button\"]:not(:empty):hover, a[id*=\"button\"]:hover, a[id*=\"Button\"]:not(:empty):hover, div[class*=\"button\"][onclick]:hover {",
  129. " background: #151515 !important;",
  130. " color: #FFF !important}",
  131. "input *, select *, button *, a.button *, a.submit * {",
  132. " color: #BBB !important;",
  133. " text-shadow: none !important}",
  134. "input:hover, input[type=\"button\"]:hover, select:hover, button:hover, [role=\"button\"]:hover, a.button:hover, a.submit:hover, a.BigButton:hover, a.TabLink:hover {",
  135. " border: 2px solid #555 !important;",
  136. " border-top-color: #555 !important;",
  137. " border-bottom-color: #555 !important;",
  138. " border-left-color: #555 !important;",
  139. " border-right-color: #555 !important}",
  140. "input:focus, select:focus {",
  141. " box-shadow: 0 0 5px #077 !important}",
  142. "input *:hover * {",
  143. " color: #F0F0F0 !important;",
  144. " text-shadow: 0 0 2px #FFF !important}",
  145. "input[disabled], select[disabled], button[disabled], input[disabled]:hover, select[disabled]:hover, button[disabled]:hover, input[disabled]:focus, select[disabled]:focus, button[disabled]:focus {",
  146. " opacity: 0.5 !important;",
  147. " border-color: #333 !important}",
  148. "",
  149. "/*",
  150. "input[type=\"checkbox\"], input[type=\"radio\"] {",
  151. " box-shadow: 0 0 0 2px #444, 0 0 2px 2px #000 !important;",
  152. " opacity: 0.7;",
  153. " transition: box-shadow 0.2s, opacity 0.2s !important}",
  154. "input[type=\"checkbox\"]:not([disabled]):hover, input[type=\"radio\"]:not([disabled]):hover {",
  155. " opacity: 0.9}",
  156. "input[type=\"checkbox\"]:not([disabled]):active, input[type=\"radio\"]:not([disabled]):active {",
  157. " box-shadow: 0 0 0 2px #999, 0 0 2px 2px #000 !important}",
  158. "input[type=\"checkbox\"]:checked, input[type=\"radio\"]:checked {",
  159. " box-shadow: 0 0 0 2px #077, 0 0 2px 2px #000 !important}",
  160. "input[type=\"checkbox\"][disabled], input[type=\"radio\"][disabled] {",
  161. " opacity: 0.35}",
  162. "*/",
  163. "input[type=\"checkbox\"] {border-radius: 1px !important}",
  164. "input[type=\"radio\"], input[type=\"radio\"]:focus {border-radius: 100% !important}",
  165. "input[type=\"checkbox\"], input[type=\"radio\"] {min-width: 12px; min-height: 12px}",
  166. "input[type=\"checkbox\"]:checked, input[type=\"radio\"]:checked {",
  167. " border-color: #077 !important;",
  168. " box-shadow: 0 0 5px #077 !important}",
  169. "",
  170. "select {",
  171. " padding-right: 15px !important;",
  172. " background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAECAYAAABCxiV9AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAeSURBVBhXY5g5c+Z/BiwALo6uAEMDTACXSWgSDAwA4jATh950E30AAAAASUVORK5CYII=) no-repeat right 4px center #060606 !important;",
  173. " transition: border-color 0.3s, background-position 0.3s !important}",
  174. "",
  175. "",
  176. "button:active, input[type=\"submit\"]:active, input[type=\"button\"]:active, a.button:active, a[class*=\"button\"]:not(:empty):active, a.submit:active, a.BigButton:active, a.TabLink:active, .Active .TabLink {",
  177. " background: #292929 !important;",
  178. " color: #FFF !important}",
  179. "",
  180. "textarea {",
  181. " -moz-appearance: none !important;",
  182. " -webkit-appearance: none !important;",
  183. " background: rgba(0,0,0,.3) !important;",
  184. " border-radius: 3px !important;",
  185. " border: 1px solid #000 !important;",
  186. " box-shadow: inset 0 0 8px #000 !important;",
  187. " transition: border-color, background, 0.3s !important}",
  188. "textarea, textarea * {",
  189. " color: #C8C8C8 !important;",
  190. " text-shadow: 0 0 1px gray !important}",
  191. "textarea:hover, textarea:focus:hover {",
  192. " border-color: #333 !important}",
  193. "textarea:focus {",
  194. " background: rgba(0,0,0,.5) !important;",
  195. " border-color: #222 !important}",
  196. "textarea:focus, textarea:focus > * {",
  197. " text-shadow: none !important;",
  198. " box-shadow: none !important}",
  199. "",
  200. "option, optgroup {",
  201. " -moz-appearance: none !important;",
  202. " -webkit-appearance: none !important;",
  203. " background: none !important;",
  204. " color: #666 !important}",
  205. "optgroup {",
  206. " background: #222 !important;",
  207. " color: #DDD !important}",
  208. "option:not([disabled]):hover, option:focus, option:checked {",
  209. " background: linear-gradient(#333, #292929) !important;",
  210. " color: #DDD !important}",
  211. "",
  212. "",
  213. "/*----- IMAGE CHANGES -----*/",
  214. "body, *:not(:empty):not(html):not(span):not(a):not(b):not(option):not(select):not(img):not([style=\"display: block;\"]):not([onclick*=\"open\"]):not([onclick*=\"s_objectID\"]):not([class*=\"stars\"]):not([id*=\"stars\"]):not([id=\"rating\"]):not([class=\"rating\"]):not([class*=\"SPRITE\"]):not([id*=\"SPRITE\"]):not([class*=\"item\"]):not([id*=\"item\"]):not([class*=\"thumb\"]):not([class*=\"icon\"]):not([class*=\"photo\"]):not(.view):not(.text):not([id*=\"lbImage\"]):not([class*=\"cc-in\"]):not([class*=\"gr-body\"]):not([id*=\"watch\"]):not(#globalsearch),",
  215. ".r3_hm, .gmbutton2 b, .gtab-i, .ph, .bstab-iLft, .csb, #pagination div, [style*=\"sprite2.png\"], #mw-head-base, #mw-page-base {",
  216. " background-image: none !important}",
  217. "",
  218. "img {opacity: .7 !important; transition: opacity .2s}",
  219. "img:hover, a:hover img, #mpiv-popup {opacity: 1 !important}"
  220. ].join("\n");
  221. if (typeof GM_addStyle != "undefined") {
  222. GM_addStyle(css);
  223. } else if (typeof PRO_addStyle != "undefined") {
  224. PRO_addStyle(css);
  225. } else if (typeof addStyle != "undefined") {
  226. addStyle(css);
  227. } else {
  228. var node = document.createElement("style");
  229. node.type = "text/css";
  230. node.appendChild(document.createTextNode(css));
  231. var heads = document.getElementsByTagName("head");
  232. if (heads.length > 0) {
  233. heads[0].appendChild(node);
  234. } else {
  235. // no head yet, stick it whereever
  236. document.documentElement.appendChild(node);
  237. }
  238. }
  239. })();