AtCoder Pure Dark

A straightforward dark theme for AtCoder: covers nav, banners, dropdowns, Ace Editor, Panels, and Copy Buttons.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

ستحتاج إلى تثبيت إضافة مثل Stylus لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتتمكن من تثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

(لدي بالفعل مثبت أنماط للمستخدم، دعني أقم بتثبيته!)

// ==UserScript==
// @name         AtCoder Pure Dark
// @namespace    https://github.com/
// @version      1.7
// @description  A straightforward dark theme for AtCoder: covers nav, banners, dropdowns, Ace Editor, Panels, and Copy Buttons.
// @author       9Sxy
// @match        *://atcoder.jp/*
// @grant        GM_addStyle
// @run-at       document-start
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';

    const pureDarkCSS = `
        /* BASE THEME SETTINGS
           Tweak these values to change the overall background/text */
        html, body, #main-container, #main-div, .container, .panel, .table, tbody, tr, td, th {
            background-color: #000000 !important;
            color: #FFFFFF !important;
            border-color: #333333 !important;
        }

        p, h1, h2, h3, h4, h5, h6, li, span, div, label {
            color: #FFFFFF !important;
        }

        /* Link Colors */
        a { color: #4da6ff !important; }
        a:visited { color: #b366ff !important; }
        a:hover { color: #80c1ff !important; }

        /* Inputs and Buttons */
        input, textarea, select, button, .form-control, .btn-default {
            background-color: #1a1a1a !important;
            color: #ffffff !important;
            border: 1px solid #555555 !important;
        }

        /* System Alerts */
        .alert-success, .alert-warning, .alert-danger, .alert-info {
            background-color: #111111 !important;
            color: #ffffff !important;
            border-color: #333333 !important;
        }

        /* UI COMPONENTS */

        /* Banners and Hero Blocks */
        .insert-participant-box, .jumbotron {
            background-color: #000000 !important;
            border: 1px solid #333333 !important;
        }
        .insert-participant-box h1, .jumbotron h1 {
            color: #FFFFFF !important;
        }

        /* Navigation Tabs */
        .nav, .nav-tabs, .nav-pills {
            background-color: #000000 !important;
            border-bottom: 1px solid #333333 !important;
        }
        .nav-tabs > li > a, .nav-pills > li > a {
            background-color: #111111 !important;
            color: #4da6ff !important;
            border: 1px solid #333333 !important;
            border-radius: 4px 4px 0 0 !important;
        }
        .nav-tabs > li > a:hover, .nav-pills > li > a:hover {
            background-color: #222222 !important; /* Active hover state */
        }
        .nav-tabs > li.active > a, .nav-tabs > li.active > a:hover, .nav-tabs > li.active > a:focus,
        .nav-pills > li.active > a, .nav-pills > li.active > a:hover, .nav-pills > li.active > a:focus {
            background-color: #000000 !important;
            color: #ffffff !important;
            border: 1px solid #333333 !important;
            border-bottom-color: #000000 !important;
        }
        .col-sm-12, #contest-nav-tabs, #contest-statement {
            background-color: #000000 !important;
        }

        /* Language Selection Dropdowns (Select2 override) */
        .select2-container--bootstrap .select2-selection,
        .select2-container--default .select2-selection--single,
        .select2-dropdown,
        .select2-results__option,
        .select2-search input {
            background-color: #111111 !important;
            color: #ffffff !important;
            border: 1px solid #333333 !important;
        }
        .select2-container--bootstrap .select2-selection__rendered {
            color: #ffffff !important;
        }
        .select2-results__option[aria-selected="true"],
        .select2-results__option--highlighted[aria-selected] {
            background-color: #333333 !important;
            color: #4da6ff !important;
        }

        /* UI Panels (Headers, Footers, Info Boxes) */
        .panel-heading, .panel-title, .panel-footer {
            background-color: #000000 !important;
            color: #FFFFFF !important;
            border-color: #333333 !important;
        }
        .panel-default > .panel-heading,
        .panel-info > .panel-heading,
        .panel-success > .panel-heading,
        .panel-warning > .panel-heading,
        .panel-danger > .panel-heading {
            background-color: #111111 !important;
            background-image: none !important;
            color: #FFFFFF !important;
            border-color: #333333 !important;
        }
        .panel-footer {
            background-color: #0c0c0c !important;
            border-top: 1px solid #333333 !important;
        }

        /* Copy Buttons */
        .btn-copy, .btn-pre-copy, .copy-btn {
            background-color: #1a1a1a !important;
            color: #ffffff !important;
            border: 1px solid #555555 !important;
        }
        .btn-copy:hover, .btn-pre-copy:hover, .copy-btn:hover {
            background-color: #333333 !important;
        }
        pre .btn-copy, pre .btn-pre-copy, pre button {
            background-color: #1a1a1a !important;
            color: #ffffff !important;
        }

        /* CODE EDITORS AND STATIC BLOCKS */

        /* Live Submission Editor (Ace Editor)
           Adjust these to change the IDE look and feel */
        .ace_editor, .ace_editor.ace-tm {
            background-color: #0c0c0c !important;
            color: #e6e6e6 !important;
            border: 1px solid #333333 !important;
        }
        .ace_gutter {
            background-color: #111111 !important;
            color: #666666 !important;
            border-right: 1px solid #333333 !important;
        }
        .ace_marker-layer .ace_active-line { background-color: #222222 !important; }
        .ace_gutter-active-line {
            background-color: #222222 !important;
            color: #ffffff !important;
        }
        .ace_marker-layer .ace_selection { background-color: #444444 !important; }
        .ace_print-margin { background-color: #333333 !important; }
        .ace_cursor { color: #ffffff !important; }

        /* Ace Editor Syntax Highlighting (VS Code Dark Style) */
        .ace_editor.ace-tm .ace_keyword { color: #569cd6 !important; } /* Blue */
        .ace_editor.ace-tm .ace_string { color: #ce9178 !important; } /* Orange */
        .ace_editor.ace-tm .ace_constant.ace_numeric { color: #b5cea8 !important; } /* Green */
        .ace_editor.ace-tm .ace_comment { color: #6a9955 !important; font-style: italic !important; }
        .ace_editor.ace-tm .ace_variable { color: #9cdcfe !important; }
        .ace_editor.ace-tm .ace_support.ace_function { color: #dcdcaa !important; } /* Yellow */
        .ace_editor.ace-tm .ace_identifier { color: #e6e6e6 !important; }
        .ace_editor.ace-tm .ace_operator { color: #d4d4d4 !important; }
        .ace_editor.ace-tm .ace_meta.ace_tag { color: #c586c0 !important; } /* Purple */

        /* Static Code Blocks (Editorials and Problem Statements) */
        pre, .prettyprint {
            background-color: #111111 !important;
            color: #e6e6e6 !important;
            border: 1px solid #333333 !important;
        }
        code {
            background-color: #222222 !important;
            color: #e6e6e6 !important;
            border-radius: 3px !important;
            padding: 2px 4px !important;
        }
        pre code {
            background-color: transparent !important;
            padding: 0 !important;
        }
        pre ol.linenums, pre.prettyprint ol.linenums {
            background-color: transparent !important; /* Removes default zebra striping */
        }
        pre ol.linenums li,
        ol.linenums li.L0, ol.linenums li.L1, ol.linenums li.L2, ol.linenums li.L3,
        ol.linenums li.L4, ol.linenums li.L5, ol.linenums li.L6, ol.linenums li.L7,
        ol.linenums li.L8, ol.linenums li.L9 {
            background: transparent !important;
            background-color: transparent !important;
            color: #888888 !important; /* Line numbers */
        }

        /* Static Code Syntax Highlighting (Google Code Prettify) */
        .prettyprint span { background-color: transparent !important; }
        .pln { color: #d4d4d4 !important; }
        .str { color: #ce9178 !important; }
        .kwd { color: #569cd6 !important; }
        .com { color: #6a9955 !important; font-style: italic !important; }
        .typ { color: #4ec9b0 !important; }
        .lit { color: #b5cea8 !important; }
        .pun { color: #d4d4d4 !important; }
        .opn { color: #d4d4d4 !important; }
        .clo { color: #d4d4d4 !important; }
        .tag { color: #569cd6 !important; }
        .atn { color: #9cdcfe !important; }
        .atv { color: #ce9178 !important; }
        .dec { color: #c586c0 !important; }

        /* Webkit Scrollbar Corners */
        ::-webkit-scrollbar-corner { background-color: #000000 !important; }
        pre::-webkit-scrollbar-corner { background-color: #111111 !important; }
    `;

    GM_addStyle(pureDarkCSS);
})();