github-dark-optimization

仅在 Github / appearance 设定为Daek default 时生效

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

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

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

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.

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

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

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

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

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name         github-dark-optimization
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  仅在 Github / appearance 设定为Daek default 时生效
// @author       You
// @license MIT
// @match        https://github.com/**
// @icon         https://www.google.com/s2/favicons?sz=64&domain=tampermonkey.net
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    const style = document.createElement('style');
    style.innerText = `
    [data-color-mode=light][data-light-theme=dark], [data-color-mode=dark][data-dark-theme=dark]{
        --color-canvas-default:#010409;
        --color-canvas-overlay:#010409;
        --color-neutral-muted:#09040187;
    }
`
    document.body.appendChild(style)
    // Your code here...
})();