Youtube Black Mode

Youtube in Black, not the ugly gray (turn on youtube dark mode for good results), now updated for the new YouTube UI

当前为 2022-11-01 提交的版本,查看 最新版本

// ==UserScript==
// @name        Youtube Black Mode
// @version     2.0
// @date        2022-11-1
// @author      Paul Reiner
// @description Youtube in Black, not the ugly gray (turn on youtube dark mode for good results), now updated for the new YouTube UI
// @include     http://*
// @include     https://*
// @run-at      document-end
// @namespace https://greasyfork.org/users/570213
// ==/UserScript==

(function(){
    "use strict";
    var x=window.location.toString().split("/")[2].split(".");
    var y=x[x.length-2];
    if (y == "youtube") {
        document.getElementsByTagName("head")[0].innerHTML+=`
<style>
html:not(.style-scope)[dark],:not(.style-scope)[dark]{
    --yt-spec-brand-background-solid:#000;
    --yt-spec-brand-background-primary:#000;
    --yt-spec-brand-background-secondary:#000;
    --yt-spec-general-background-a:#000;
    --yt-spec-base-background:#000;
    --yt-spec-10-percent-layer:var(--secondary-text-color);
    --yt-spec-badge-chip-background:rgb(255 255 255 / 7%);
    --yt-spec-additive-background:rgb(255 255 255 / 7%);
    --yt-spec-menu-background:rgb(0 0 0 / 70%);
}
#ytp-id-18 {
    background:rgb(0 0 0 / 70%);
}
div.sbdd_b {
    backdrop-filter:blur(30px);
    background:rgb(0 0 0 / 70%);
    border:1px solid rgb(255 255 255 / 10%);
}
div.sbsb_a {
    background:transparent;
}
div.sbfl_b {
    background:transparent;
    color:var(--yt-spec-text-primary);
}
li.gsfs {
    color:var(--yt-spec-text-primary);
}
div.sbqs_c::before {
    filter:invert(100%);
}
li.sbsb_d {
    background:hsla(0, 0%, 100%, 0.08);
}
tp-yt-iron-dropdown.style-scope.ytd-popup-container {
    backdrop-filter: blur(30px);
    border: 1px solid rgb(255 255 255 / 10%);
    border-radius: 12px;
}
#cinematics {
    visibility: hidden;
}
</style>`;
        document.getElementById("country-code").innerText="BLACK";
    }
})();