Greasy Fork Dark Theme

changes greasy fork bright theme to dark.

当前为 2021-12-11 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Greasy Fork Dark Theme
  3. // @namespace -
  4. // @version 0.1
  5. // @description changes greasy fork bright theme to dark.
  6. // @author NotYou
  7. // @match https://greasyfork.org
  8. // @match https://greasyfork.org/*
  9. // @match http://greasyfork.org
  10. // @match http://greasyfork.org/*
  11. // @run-at document-body
  12. // @icon https://greasyfork.org/packs/media/images/blacklogo96-b2384000fca45aa17e45eb417cbcbb59.png
  13. // @grant GM_addStyle
  14. // @license AGPLv3 (https://www.gnu.org/licenses/agpl-3.0.txt)
  15. // ==/UserScript==
  16.  
  17. (function() {
  18. let css = `
  19.  
  20. img {
  21. border-radius: 4px;
  22. }
  23.  
  24. #main-header {
  25. background-color: rgb(221, 97, 23);
  26. background-image: linear-gradient(rgb(240, 135, 0), rgb(170, 96, 0));
  27. }
  28.  
  29. #main-header h1 {
  30. color: #090909;
  31. padding: 6px 4px;
  32. }
  33.  
  34. #main-header, #main-header a, #main-header a:active, #main-header a:visited {
  35. color: rgb(9, 9, 9);
  36. }
  37.  
  38. #main-header, #main-header a, #main-header a:active, #main-header a {
  39. color: rgb(9, 9, 9);
  40. }
  41.  
  42. .tabs .current {
  43. border-top: 7px solid rgb(153, 129, 0);
  44. border-radius: 0px 0px 4px 4px;
  45. }
  46.  
  47. #script-info {
  48. border: 1px solid rgb(21, 21, 21);
  49. background-color: rgb(19, 19, 19);
  50. box-shadow: rgb(0, 0, 0) 0px 0px 5px;
  51. }
  52.  
  53. .user-content {
  54. background: rgba(0, 0, 0, 0) linear-gradient(90deg, rgb(13, 13, 13), rgb(21, 21, 21) 1em) repeat scroll 0% 0%;
  55. border-radius: 0px 10px 10px 0px;
  56. border-left: 2px solid rgb(11, 11, 11);
  57. }
  58.  
  59. .install-link {
  60. border-radius: 5px 0px 0px 5px;
  61. }
  62.  
  63. .install-help-link {
  64. border-radius: 0px 5px 5px 0px;
  65. }
  66.  
  67. nav nav {
  68. box-shadow: rgb(0, 0, 0) 0px 0px 5px;
  69. border: 1px solid rgb(202, 137, 14);
  70. background-color: rgb(201, 113, 0);
  71. border-radius: 4px;
  72. }
  73.  
  74. #language-selector-locale {
  75. background-color: rgb(19, 19, 19);
  76. border: 1px solid rgb(21, 21, 21);
  77. border-radius: 4px;
  78. }
  79.  
  80. .home-search input[type="search"] {
  81. background-color: #0f0f0f;
  82. border-color: #1e1e1e;
  83. border-radius: 4px;
  84. color: #fff9;
  85. }
  86.  
  87. .discussion-list, .script-list, .text-content, .user-list {
  88. box-shadow: rgb(0, 0, 0) 0px 0px 5px;
  89. background-color: rgb(15, 15, 15);
  90. border: 1px solid rgb(19, 19, 19);
  91. }
  92.  
  93. .list-option-group ul {
  94. box-shadow: rgb(36, 36, 36) 0px 0px 5px;
  95. border: 1px solid rgb(17, 17, 17);
  96. border-radius: 5px;
  97. background-color: rgb(19, 19, 19);
  98. }
  99.  
  100. .list-option-group .list-current {
  101. background: rgba(0, 0, 0, 0) linear-gradient(rgb(28, 28, 28), rgb(17, 17, 17)) repeat scroll 0% 0%;
  102. border-left: 7px solid rgb(183, 180, 0);
  103. }
  104.  
  105. :not(:lang(he)):not(:lang(ar)):not(:lang(ug)), body:lang(ar) #main-header, body:lang(he) #main-header, body:lang(ug) #main-header {
  106. color: rgb(200, 200, 200);
  107. }
  108.  
  109. .good-rating-count {
  110. background-color: rgba(26, 204, 26, 0.1);
  111. border-color: rgba(20, 225, 20, 0.3);
  112. box-shadow: rgba(41, 221, 15, 0.11) 0px 0px 5px;background-color: rgba(26, 204, 26, 0.1);
  113. }
  114.  
  115. .ok-rating-count {
  116. background-color: rgba(225, 225, 0, 0.1);
  117. border-color: rgba(234, 234, 0, 0.3);
  118. box-shadow: rgba(221, 179, 15, 0.11) 0px 0px 5px;
  119. }
  120.  
  121. .bad-rating-count {
  122. background-color: rgba(255, 0, 0, 0.1);
  123. border-color: rgba(234, 0, 0, 0.3);
  124. box-shadow: rgba(221, 15, 15, 0.11) 0px 0px 5px;
  125. }
  126.  
  127. .badge.badge-js {
  128. background-color: rgba(251, 212, 0, 0.66);
  129. border-color: rgb(255, 191, 0);
  130. box-shadow: rgba(221, 179, 15, 0.29) 0px 0px 5px;
  131. }
  132.  
  133. .badge.badge-css {
  134. background-color: rgba(0, 157, 251, 0.66);
  135. border-color: rgb(0, 100, 255);
  136. box-shadow: rgba(15, 153, 221, 0.29) 0px 0px 5px;
  137. }
  138.  
  139. #home-top-sites a {
  140. color: #bdb322;
  141. }
  142.  
  143. #add-additional-info {
  144. color: #000;
  145. }
  146.  
  147. #script-version-additional-info-0 {
  148. background-color: rgb(19, 19, 19);
  149. border: 1px solid rgb(11, 11, 11);
  150. border-radius: 5px;
  151. }
  152.  
  153. #script_version_code {
  154. background-color: rgb(19, 19, 19);
  155. border-radius: 5px;
  156. border: 1px solid rgb(22, 22, 22);
  157. }
  158.  
  159. select {
  160. background-color: rgb(19, 19, 19);
  161. border-radius: 4px;
  162. border: 1px solid rgb(23, 23, 23);
  163. }
  164.  
  165. code, pre {
  166. border: 1px solid rgb(32, 32, 32);
  167. }
  168.  
  169. code {
  170. background-color: rgb(26, 26, 26);
  171. }
  172.  
  173. input {
  174. background-color: rgb(19, 19 , 19);
  175. border: 1px solid rgb(22, 22, 22);
  176. border-radius: 4px;
  177. }
  178.  
  179. dark {
  180. color: #000;
  181. }
  182.  
  183. body {
  184. background-color: rgb(19, 19, 19);
  185. }
  186.  
  187. `;
  188. if (typeof GM_addStyle !== "undefined") {
  189. GM_addStyle(css);
  190. } else {
  191. let styleNode = document.createElement("style");
  192. styleNode.appendChild(document.createTextNode(css));
  193. (document.querySelector("head") || document.documentElement).appendChild(styleNode);
  194. }
  195. })();
  196.  
  197. // Other styles
  198.  
  199. var element = document.getElementsByClassName("badge badge-js");
  200. element.classList.add("dark");