Submission Grinder Simple Dark Mode

Really simple dark-mode for The Submission Grinder

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

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

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         Submission Grinder Simple Dark Mode
// @namespace    http://tampermonkey.net/
// @version      1.0.0
// @description  Really simple dark-mode for The Submission Grinder
// @author       Robert Luke Wilkins
// @match        https://thegrinder.diabolicalplots.com/*
// @icon         https://thegrinder.diabolicalplots.com/favicon.ico
// @license      MIT
// @grant        GM_addStyle
// @run-at       document-start
// ==/UserScript==

(function() {
    'use strict';

    // A quick dark mode for The Submission Grinder
    GM_addStyle(`
        html {
            /* Invert all the colors as the base for the dark mode */
            filter: invert(1);
        }
        /* For the charts, reset the palette to default (inverted is hard to read), but make them less stark by dropping contrast */
        #subRecencyChart, #responseRecencyChart, #turnAroundChart {
            filter: invert(1) contrast(70%);
        }
        /* For non-standard pending status types, reset all the palette inversions to keep the default orange & red colors */
        .SubmissionResultStatusExceedsEstimated, .SubmissionResultStatusExceedsAverage {
            filter: invert(1);
        }
        /* Make the legend a little easier to read in dark mode by raising the opacity from 0.6 to 0.8 */
        table.jqplot-table-legend, .jqplot-table-legend {
            background: rgba(255, 255, 255, 0.8);
        }
        /* Lastly, override the basic link colors, because the default palette inversions aren't great */
        a {
            color: #aa3;
        }
        a:visited {
            color: #3a3;
        }
    `);
})();