midnight

glabal darl style

此腳本不應該直接安裝,它是一個供其他腳本使用的函式庫。欲使用本函式庫,請在腳本 metadata 寫上: // @require https://update.gf.qytechs.cn/scripts/515310/1475971/midnight.js

  1. (function() {
  2. var css = "";
  3. css += [
  4. "@namespace html url(http://www.w3.org/1999/xhtml);",
  5. "@namespace xul url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);",
  6. "",
  7. "/* Browser Background */",
  8. "browser[type=\"content-primary\"] {",
  9. "background-color: #141414 !important;",
  10. "}"
  11. ].join("\n");
  12.  
  13. css += [
  14. "/* Visual SVN custom styles */",
  15. "#content {width:100% !important;}",
  16. "tr.removed {background-color: #460000 !important}",
  17. "tr.added {background-color: #002700 !important}",
  18. "span.modified-file:before {background-color: blue !important}",
  19. "span.added-file:before {background-color: green !important}",
  20. "span.deleted-file:before {background-color: red !important}",
  21. "a.button {background-image: none !important; background-color: black !important, color: silver !important}",
  22. "}"
  23. ].join("\n");
  24.  
  25. css += [
  26. "/* Styles from midnigth surfing */",
  27. "/* No background images. try to exclude icons, other misc items. */",
  28. "",
  29. "*:not(:empty):not([onclick*=\"open\"]):not(span):not([class*=\"stars\"]):not([id*=\"stars\"]):not([id=\"rating\"]):not([class=\"rating\"]):not([class*=\"prite\"]):not([id*=\"prite\"]):not([id*=\"lbImage\"]) {",
  30. "background-image: none !important;",
  31. "}",
  32. "",
  33. "/* Basic Bodies */",
  34. "html,",
  35. "body {",
  36. "background: none #141414 !important;",
  37. "}",
  38. "",
  39. "/* Make descendents of the body element transparent. Formerly \"DIV + SPAN\" rules. */",
  40. "body * {",
  41. "background-color: transparent !important;",
  42. "}",
  43. "",
  44. "/* Give id\'s BG hopefully */",
  45. "div[id] {",
  46. "background-color: inherit !important;",
  47. "}",
  48. "",
  49. "/* Filter non-icons */",
  50. "span:not(:empty):not([class*=\"icon\"]):not([id*=\"icon\"]):not([class*=\"star\"]):not([id*=\"star\"]):not([id*=\"rating\"]):not([class*=\"rating\"]):not([class*=\"prite\"]) {",
  51. "",
  52. "background: none transparent !important;",
  53. "border-color: #000 !important;",
  54. "}",
  55. "",
  56. "/* Try to contrast containers */",
  57. "html:root > body > * > * > * > *:not(input):not([onclick]) > div:not(:empty):not([id]) {",
  58. "background: none #1c1c1c !important",
  59. "}",
  60. "",
  61. "/* :::::::: Text Presentation :::::::: */",
  62. "",
  63. "summary,",
  64. "details {",
  65. "background-color: inherit !important;",
  66. "}",
  67. "",
  68. "abbr,",
  69. "progress,",
  70. "time,",
  71. "label,",
  72. ".date {",
  73. "color: #CDEFC2 !important;",
  74. "}",
  75. "",
  76. "mark,",
  77. "code,",
  78. "pre,",
  79. "blockquote,",
  80. "[class*=\"quote\"],",
  81. "td[style*=\"inset\"][class=\"alt2\"] {",
  82. "background-color: #00090F !important;",
  83. "}",
  84. "",
  85. "",
  86. "/* :::::::: Headings + Header :::::::: */",
  87. "",
  88. "/* Header gradient rules */",
  89. "",
  90. "header, ",
  91. "#header {",
  92. "background: -moz-linear-gradient(#333,#141414) transparent !important;",
  93. "}",
  94. "",
  95. "#header h1 {",
  96. "background-color: transparent !important;",
  97. "}",
  98. "",
  99. "h1,",
  100. "h2 { ",
  101. "background: none #28313E !important;",
  102. "border-radius: 5px !important;",
  103. "-moz-border-radius: 5px !important;",
  104. "-webkit-border-radius: 5px !important;",
  105. "} ",
  106. "",
  107. "h3,",
  108. "h4 {",
  109. "background: none #2A3731 !important;",
  110. "border-radius: 5px !important;",
  111. "-moz-border-radius: 5px !important;",
  112. "-webkit-border-radius: 5px !important;",
  113. "} ",
  114. "",
  115. "h5,",
  116. "h6 {",
  117. "background: none #372A2A !important;",
  118. "}",
  119. "",
  120. "",
  121. "/* :::::::: Lists :::::::: */",
  122. "",
  123. "dt {",
  124. "background-color: #2B3135 !important;",
  125. "}",
  126. "",
  127. "dl,",
  128. "dd {",
  129. "background-color: #232323 !important;",
  130. "}",
  131. "",
  132. "li,",
  133. "ul {",
  134. "background-color: inherit !important;",
  135. "}",
  136. "",
  137. "li a:not([class*=\"icon\"]):not([id*=\"icon\"]):not([onclick]),",
  138. "dt a:not([class*=\"icon\"]):not([id*=\"icon\"]):not([onclick]) {",
  139. "background-image: none !important;",
  140. "text-indent: 0 !important;",
  141. "}",
  142. "",
  143. "/* :::::::: list Item highlight :::::::: */",
  144. "",
  145. "li[class*=\"item\"] a:hover,",
  146. "li[class*=\"item\"]:hover,",
  147. "",
  148. "/* Not list item, but still useful*/",
  149. "",
  150. "[class*=\"menuitem\"]:hover {",
  151. "background-color: #2E2B2F !important;",
  152. "}",
  153. "",
  154. "/* :::::::: Tables, cells :::::::: */",
  155. "",
  156. "table {",
  157. "background-color: #232323 !important; ",
  158. "border-color: #333 !important;",
  159. "}",
  160. "",
  161. "table table {",
  162. "background: #191919 !important;",
  163. "}",
  164. "",
  165. "th,",
  166. "caption {",
  167. "background-color: #353535 !important;",
  168. "}",
  169. "",
  170. "/* :::::::: Input :::::::: */",
  171. "",
  172. "/* === Basic === */",
  173. "",
  174. "/* anonymous divs */",
  175. "",
  176. "input *,",
  177. "textarea * {",
  178. "color: #DDD !important;",
  179. "}",
  180. "",
  181. "html body input:not([type=\"image\"]),",
  182. "button,",
  183. "html body textarea {",
  184. "",
  185. "background: none #353535 !important; ",
  186. "-moz-appearance: none !important;",
  187. "-webkit-appearance: none !important;",
  188. "color: #DDD !important;",
  189. "border: solid 1px #777 !important;",
  190. "border-radius: 0 !important;",
  191. "-moz-border-radius: 0 !important;",
  192. "-webkit-border-radius: 0 !important;",
  193. "opacity: 1 !important;",
  194. "}",
  195. "",
  196. "/* Style reset. */",
  197. "",
  198. "html body input[type=\"checkbox\"] {",
  199. "-moz-appearance: checkbox !important;",
  200. "-webkit-appearance: checkbox !important;",
  201. "}",
  202. "",
  203. "html body input[type=\"radio\"] {",
  204. "-moz-appearance: radio !important;",
  205. "-webkit-appearance: radio !important;",
  206. "}",
  207. "",
  208. "/* :::::::: Custom styling :::::::: */",
  209. "",
  210. "html:root input[type=\"button\"],",
  211. "html:root input[type=\"submit\"],",
  212. "html:root input[type=\"reset\"],",
  213. "html:root button {",
  214. "",
  215. "color: #EEE !important;",
  216. "background-color: #222437 !important;",
  217. "",
  218. "-moz-box-shadow: inset 0 1px rgba(255,255,255,0.2), inset 0 10px rgba(255,255,255,0.1), inset 0 10px 20px rgba(255,255,255,0.15), inset 0 -15px 30px rgba(0,0,0,0.2) !important;",
  219. "-webkit-box-shadow: inset 0 1px rgba(255,255,255,0.2), inset 0 10px rgba(255,255,255,0.1), inset 0 10px 20px rgba(255,255,255,0.15), inset 0 -15px 30px rgba(0,0,0,0.2) !important;",
  220. "}",
  221. "",
  222. "html:root input[type=\"button\"]:hover,",
  223. "html:root input[type=\"submit\"]:hover,",
  224. "html:root input[type=\"reset\"]:hover,",
  225. "html:root button:hover {",
  226. "",
  227. "color: #FFF !important;",
  228. "background-color: #31344F !important;",
  229. "border-color: #5F687F !important;",
  230. "",
  231. "-moz-box-shadow: inset 0 1px rgba(255,255,255,0.3), inset 0 10px rgba(255,255,255,0.2), inset 0 10px 20px rgba(255,255,255,0.25), inset 0 -15px 30px rgba(0,0,0,0.3) !important;",
  232. "-webkit-box-shadow: inset 0 1px rgba(255,255,255,0.3), inset 0 10px rgba(255,255,255,0.2), inset 0 10px 20px rgba(255,255,255,0.25), inset 0 -15px 30px rgba(0,0,0,0.3) !important;",
  233. "}",
  234. "",
  235. "html:root input[type=\"image\"] {",
  236. "opacity: .85 !important;",
  237. "}",
  238. "",
  239. "html:root input[type=\"image\"]:hover {",
  240. "opacity: .95 !important;",
  241. "}",
  242. "",
  243. "/* Drop-down menu */",
  244. "",
  245. "select,",
  246. "option,",
  247. "optgroup {",
  248. "",
  249. "background: none #383838 !important;",
  250. "border-color:#555 !important;",
  251. "color:#f1f1f1 !important;",
  252. "-moz-appearance: none !important;",
  253. "}",
  254. "",
  255. "/* :::::::: Misc :::::::: */",
  256. "",
  257. "address {",
  258. "background: none #333 !important;",
  259. "}",
  260. "",
  261. "hr {",
  262. "background: none #444 !important",
  263. "}",
  264. "",
  265. "/*currently viewed page*/",
  266. ".current {",
  267. "color: #FFF !important;",
  268. "}",
  269. "",
  270. "/* Remove Rounded Corners, Borders, Spacer, Padding images */",
  271. "",
  272. "img[src*=\"spacer\"]:empty,",
  273. "[id*=\"round\"]:empty,",
  274. "[id*=\"bottom\"]:empty, ",
  275. "[class*=\"bottom\"]:empty,",
  276. "[class*=\"Bottom\"]:empty,",
  277. "[id*=\"top\"]:empty,",
  278. "[class*=\"top\"]:empty,",
  279. "[class*=\"Top\"]:empty,",
  280. "[class*=\"spacer\"]:empty {",
  281. "background-image: none !important;",
  282. "}",
  283. "",
  284. "/* Menus and Navigation */",
  285. "",
  286. "nav, ",
  287. "menu,",
  288. "",
  289. "/*Common naming conventions - in case previous declarations fail to give solid BG*/",
  290. "",
  291. "html body [class*=\"open\"],",
  292. "html body [id*=\"Dropdown\"],",
  293. "html body [id*=\"dropdown\"],",
  294. "html body [class*=\"Dropdown\"],",
  295. "html body [class*=\"dropdown\"],",
  296. "html body [id*=\"menu\"]:not(SELECT),",
  297. "html body [class*=\"menu\"]:NOT(SELECT),",
  298. "html body [class*=\"tooltip\"],",
  299. "html body [class*=\"popup\"], ",
  300. "html body [id*=\"popup\"],",
  301. "",
  302. "/* Notes, details, etc. Maybe useful */",
  303. "",
  304. "html body [class*=\"note\"],",
  305. "html body [class*=\"detail\"],",
  306. "html body [class*=\"description\"]",
  307. "",
  308. "{background-color: #232323 !important}",
  309. "",
  310. "/* Also common */",
  311. "[class*=\"content\"],",
  312. "[class*=\"container\"] {",
  313. "background-color: #1c1c1c !important;",
  314. "}",
  315. "",
  316. "/* Headers, Logos */",
  317. "",
  318. "[id*=\"masthead\"] a,",
  319. "[id*=\"header\"] a,",
  320. "[id*=\"logo\"] a,",
  321. "[class*=\"logo\"] a {",
  322. "text-indent: 0 !important;",
  323. "}",
  324. "",
  325. "/* Instead of increasing specificity rating by using :not, set rules separately */",
  326. "",
  327. "html:root body [class*=\"layer\"],",
  328. "html:root body #lightbox-nav,",
  329. "html:root body #imageContainer {",
  330. "background-color: transparent !important;",
  331. "}",
  332. "",
  333. "/*::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*/",
  334. "",
  335. "/* Universal - sets color of text, border */",
  336. "",
  337. "* {",
  338. "color: #CCC !important; ",
  339. "border-color: #444 !important;",
  340. "outline-color: #444 !important;",
  341. "text-shadow: none !important;",
  342. "}",
  343. "",
  344. "html *:after,",
  345. "html *:before {",
  346. "color: #CCC !important;",
  347. "border-color: #666 !important;",
  348. "background: none transparent !important;",
  349. "}",
  350. "",
  351. "",
  352. "/* Link */",
  353. "",
  354. "a:link,",
  355. "a:link *:not(img){ ",
  356. "",
  357. "color: #B1CBF7 !important;",
  358. "background-color: transparent !important;",
  359. "border-color: #666 !important;}",
  360. "",
  361. "a:visited, ",
  362. "a:visited * {",
  363. "color: #CDB4E7 !important;",
  364. "}",
  365. "",
  366. "a:hover,",
  367. "a:hover *:not(img){",
  368. "",
  369. "color: #FFE900 !important; ",
  370. "background-color: #363037 !important;",
  371. "border-color: #999 !important;",
  372. "}",
  373. "",
  374. "html [href*=\"#\"]:hover {",
  375. "color: #FFE900 !important;",
  376. "background-color: transparent !important;",
  377. "}",
  378. "",
  379. "",
  380. "/* Event Handlers/Attributes */",
  381. "",
  382. "[onclick],",
  383. "[ondblclick],",
  384. "[onmousedown] {",
  385. "color: #DFD5BC !important;",
  386. "text-indent: 0 !important;",
  387. "}",
  388. "",
  389. "[onclick]:hover,",
  390. "[ondblclick]:hover,",
  391. "[onmousedown]:hover {",
  392. "color: #FEFF97 !important;",
  393. "}",
  394. "",
  395. "/* Make images transparent */",
  396. "",
  397. "img {",
  398. "opacity: .75 !important;",
  399. "}",
  400. "",
  401. "img:hover {",
  402. "opacity: 1 !important;",
  403. "background-color: #888 !important;",
  404. "}",
  405. "",
  406. "svg {",
  407. "background: none #666 !important;",
  408. "}",
  409. "",
  410. "/* Highlight */",
  411. "::-moz-selection {",
  412. "background-color: #626F61 !important;",
  413. "color: #F6F7B9 !important;",
  414. "}",
  415. "",
  416. "/* :::::::: Specific Fixes :::::::: */",
  417. "",
  418. "/* google search link fix */",
  419. ".g .r {",
  420. "background-color: transparent !important;",
  421. "}",
  422. "",
  423. "/* google result hover highlight*/",
  424. "div.vsc:hover > .vspi, div.vso > .vspi {",
  425. "background: none transparent !important;",
  426. "border: none !important;",
  427. "}"
  428. ].join("\n");
  429. var node = document.createElement("style");
  430. node.type = "text/css";
  431. node.appendChild(document.createTextNode(css));
  432. var heads = document.getElementsByTagName("head");
  433. if (heads.length > 0) {
  434. heads[0].appendChild(node);
  435. } else {
  436. // no head yet, stick it whereever
  437. document.documentElement.appendChild(node);
  438. }
  439. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址