AtCoderDarkTheme

AtCoderのダークテーマです

  1. // ==UserScript==
  2. // @name AtCoderDarkTheme
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description AtCoderのダークテーマです
  6. // @author null_null
  7. // @license MIT
  8. // @match https://atcoder.jp/*
  9. // @exclude https://atcoder.jp/contests/*/standings/json
  10. // @require https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js
  11. // ==/UserScript==
  12.  
  13. (function () {
  14.  
  15. update();
  16.  
  17. //順位表ページ 特別な処理をする。
  18. if (document.URL.match("/standings")) {
  19.  
  20. new MutationObserver(update).observe(
  21. document.getElementById("standings-tbody"), {
  22. childList: true,
  23. attributes:true
  24. }
  25. );
  26.  
  27. //リフレッシュボタンの監視
  28. new MutationObserver(async mutationRecord => {
  29. const isDisabled = mutationRecord[0].target.classList.contains(
  30. "disabled"
  31. );
  32. if (isDisabled) {
  33. update();
  34. }
  35. })
  36. .observe(document.getElementById("refresh"), {
  37. attributes: true,
  38. attributeFilter: ["class"]
  39. });
  40.  
  41. }
  42.  
  43. if (document.URL.match("/results")) {
  44.  
  45. new MutationObserver(update).observe(
  46. document.getElementById("vue-results"), {
  47. childList: true,
  48. attributes:true
  49. }
  50. );
  51.  
  52. }
  53. /////////////////////////////////////////////////////////////////
  54. //外部全体
  55. $("body").css({
  56. "background-color": "#111111",
  57. });
  58.  
  59. //外部左右
  60. $("#main-div.float-container").css({
  61. "background-color": "#111111"
  62. });
  63.  
  64. //外部フッター
  65. $(".footer").css({
  66. "background-color": "#111111"
  67. });
  68.  
  69. //////////////////////////////////////////////////////
  70. //https://atcoder.jp
  71.  
  72. //内部コンテナ
  73. $(".float-container>#main-container").css({
  74. "background-color": "#333333",
  75. "color": "#EFFFE9"
  76. });
  77.  
  78. //タイトル枠
  79. $(".insert-participant-box").css({
  80. "background-color": "#333333",
  81. "color": "#EFFFE9"
  82. });
  83.  
  84. //
  85. $(".cnvtb-fixed").css({
  86. "background-color": "#333333",
  87. });
  88.  
  89. //パネル内部
  90. $(".panel-primary").css({
  91. "background-color": "#333333",
  92. "border-color": "#E71D36",
  93. "color": "#EFFFE9"
  94. });
  95.  
  96. //パネルヘッダー
  97. $(".panel-primary>.panel-heading").css({
  98. "background-color": "#E71D36",
  99. "border-color": "#E71D36",
  100. "color": "#EFFFE9"
  101. });
  102.  
  103. //パネル内部
  104. $(".panel").css({
  105. "background-color": "#333333",
  106. "color": "#EFFFE9",
  107. });
  108.  
  109. //インフォメーションパネル タイトル
  110. $(".panel-info>.panel-heading").css({
  111. "background-color": "#2f4f4f",
  112. "border-color": "#2f4f4f",
  113. "color": "#EFFFE9"
  114. });
  115.  
  116. //インフォメーションパネル外枠
  117. $(".panel-info").css({
  118. "border-color": "#2f4f4f"
  119. });
  120.  
  121. //コンテストパネル外部
  122. $(".post-footer").css({
  123. "background-color": "#222222",
  124. "border-color": "#222222",
  125. "color": "#EFFFE9"
  126. });
  127.  
  128.  
  129. //////////////////////////////////////////////////////////
  130. //https://atcoder.jp/contests/
  131.  
  132. //過去のコンテスト検索
  133. $(".panel-default>.panel-heading").css({
  134. "background-color": "#333333",
  135. "color": "#EFFFE9",
  136. "border-color": "#EFFFE9"
  137. });
  138.  
  139. //過去コンテストパネル 外枠
  140. $(".panel-default").css({
  141. "border-color": "#EFFFE9"
  142.  
  143. });
  144.  
  145. //提出バー
  146. $(".dropdown-menu").css({
  147. "background-color": "#333333"
  148. });
  149.  
  150. //ボタン
  151. $(".btn-primary").css({
  152. "background-color": "#E71D36",
  153. "border-color": "#E71D36"
  154. });
  155.  
  156. //全体 後光
  157. $(".float-container>#main-container ").css({
  158. "box-shadow": "0px 0px 10px 5px #666666"
  159. });
  160.  
  161.  
  162. //サンプル 背景
  163. $("pre").css({
  164. "background-color": "#333333",
  165. "color": "#EFFFE9",
  166. });
  167.  
  168. //nav 外枠
  169. $(".nav-tabs>li.active>a").css({
  170. "border-color": "#EFFFE9"
  171. });
  172.  
  173. //コンテスト時間 文字部分
  174. $("small.contest-duration").css({
  175. "color": "#EFFFE9"
  176. });
  177.  
  178. //灰色文字 調整
  179. $(".grey").css({
  180. "color": "#EFFFE9"
  181. });
  182.  
  183. //順位表 所属 文字
  184. $(".ranking-affiliation").css({
  185. "color": "#EFFFE9"
  186. });
  187.  
  188. //テーブル 線
  189. $(".table>thead>tr>th").css({
  190. "border-bottom": "#EFFFE9"
  191. });
  192. //テーブル 奇数番目 黒色背景固定
  193. $(".table-condensed>tbody>tr>td").css({
  194. "background-color": "#333333"
  195. });
  196.  
  197. //参加対象 Rated対象 ペナルティ
  198. $("#main-container > div.row > div:nth-child(2) > p").css({
  199. "color":"#EFFFE9"
  200. });
  201.  
  202. //コピーライト
  203. $("#copyright").css({
  204. "color":"#EFFFE9"
  205. });
  206.  
  207. //問題文 赤文字
  208. $("code").css({
  209. "color":"#ff7a7a"
  210. });
  211. })();
  212.  
  213. function update() {
  214. //レートの色を鮮やかにする
  215. if(!document.URL.match("/results")){
  216.  
  217. $(".user-red").css({
  218. "color":"#ff7a7a"
  219. });
  220.  
  221. $(".user-orange").css({
  222. "color": "#ffbc7a"
  223. });
  224.  
  225. $(".user-yellow").css({
  226. "color": "#ffff7a"
  227. });
  228. $(".user-blue ").css({
  229. "color": "#7a7aff"
  230. });
  231.  
  232. $(".user-cyan").css({
  233. "color": "#7affff"
  234. });
  235.  
  236. $(".user-green").css({
  237. "color": "#7aff7a"
  238. });
  239.  
  240. $(".user-brown").css({
  241. "color": "#8b4513"
  242. });
  243.  
  244. $(".user-gray").css({
  245. "color": "#eeeeee"
  246. });
  247.  
  248. $(".user-unrated").css({
  249. "color": "000000"
  250. });
  251.  
  252. $(".user-admin").css({
  253. "color": "#2f4f4f"
  254. });
  255. }
  256.  
  257. $("a").css({
  258. "color": "#EFFFE9",
  259. "background-color": "transparent"
  260. });
  261.  
  262. $(".pagination>.active>a").css({
  263. "border-color": "#EFFFE9"
  264. });
  265.  
  266. //テーブルの奇数番目
  267. $(".table-striped>tbody>tr:nth-of-type(odd)").css({
  268. "background-color": "#323232",
  269. });
  270.  
  271. //順位表 順位
  272. $(".standings-rank").css({
  273. "background-color": "#333333"
  274. });
  275. //順位表 ユーザーネーム
  276. $(".standings-username").css({
  277. "background-color": "#333333"
  278. });
  279. //順位表 点数
  280. $(".standings-result").css({
  281. "background-color": "#333333"
  282. });
  283.  
  284. //順位表下部文字
  285. $(".standings-result p").css({
  286. "color": "#EFFFE9"
  287. });
  288. //順位表下部文字
  289. $(".standings-fa td p").css({
  290. "color": "#EFFFE9"
  291. });
  292. //順位表下部文字
  293. $(".standings-statistics td p").css({
  294. "color": "#EFFFE9"
  295. });
  296.  
  297. //得点
  298. $(".standings-score").css({
  299. "color": "#7a7aff"
  300. });
  301.  
  302. //AC文字
  303. $(".standings-ac").css({
  304. "color": "#7aff7a"
  305. });
  306.  
  307. //提出ペナルティ
  308. $(".standings-wa").css({
  309. "color": "#ff7a7a"
  310. });
  311.  
  312. //順位表 正解者数
  313. $("#standings-tbody > tr.standings-statistics").css({
  314. "background-color":"#333333"
  315. });
  316.  
  317.   //順位表 最速正解者
  318. $("#standings-tbody > tr.standings-fa").css({
  319. "background-color":"#333333"
  320. });
  321. }

QingJ © 2025

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