Youtube Black Mode

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

目前为 2022-12-30 提交的版本。查看 最新版本

// ==UserScript==
// @name        Youtube Black Mode
// @version     2.7
// @date        2022-12-30
// @author      Paul Reiner
// @description Youtube in Black, not 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://gf.qytechs.cn/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:rgb(255 255 255 / 10%);
    --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 {
    backdrop-filter:blur(90px);
    background:rgb(0 0 0 / 70%);
    border:1px solid rgb(255 255 255 / 10%);
    box-shadow: 0px 0px 30px 6px rgba(0, 0, 0, 0.7);
}
div.sbdd_b {
    backdrop-filter:blur(90px);
    background:rgb(0 0 0 / 70%);
    border:1px solid rgb(255 255 255 / 10%);
    box-shadow: 0px 6px 30px 6px rgba(0, 0, 0);
}
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(90px);
    border: 1px solid rgb(255 255 255 / 10%);
    border-radius: 12px;
    box-shadow: 0px 0px 30px 6px rgba(0, 0, 0, 0.7);
}
#cinematics {
    visibility: hidden;
}
ytd-thumbnail[size=large] a.ytd-thumbnail, ytd-thumbnail[size=large]:before {
    border-radius: 1px;
}
#thumbnail {
    border-radius: 1px;
}
.yt-spec-button-shape-next--mono.yt-spec-button-shape-next--filled {
    color: var(--yt-spec-text-primary);
    background: #cc0000;
    border-radius: 2px;
    text-transform: uppercase;
}
button.yt-spec-button-shape-next.yt-spec-button-shape-next--filled.yt-spec-button-shape-next--mono.yt-spec-button-shape-next--size-m:hover {
    background: #880000;
}
.yt-spec-button-shape-next--mono.yt-spec-button-shape-next--filled[aria-label="Join this channel"] {
    background: var(--yt-spec-badge-chip-background);
    text-transform: capitalize;
}
button.yt-spec-button-shape-next.yt-spec-button-shape-next--filled.yt-spec-button-shape-next--mono.yt-spec-button-shape-next--size-m[aria-label="Join this channel"]:hover {
    background: #333333;
}
.yt-spec-button-shape-next--size-m {
    border-radius: 2px;
}
.yt-spec-button-shape-next--size-m.yt-spec-button-shape-next--segmented-start {
    border-radius: 2px 0 0 2px;
}
.yt-spec-button-shape-next--size-m.yt-spec-button-shape-next--segmented-end {
    border-radius: 0 2px 2px 0;
}
yt-chip-cloud-chip-renderer[modern-chips][chip-style] {
    border-radius: 2px;
}
ytd-searchbox[desktop-searchbar-style=rounded_corner_borders_light_btn] #search-icon-legacy.ytd-searchbox, ytd-searchbox[desktop-searchbar-style=rounded_corner_autofocus] #search-icon-legacy.ytd-searchbox {
    border-radius: 0 2px 2px 0;
}
ytd-searchbox[desktop-searchbar-style=rounded_corner_borders_light_btn] #container.ytd-searchbox, ytd-searchbox[desktop-searchbar-style=rounded_corner_autofocus] #container.ytd-searchbox {
    border-radius: 2px 0 0 2px;
}
.sbdd_b {
    border-radius: 8px;
}
ytd-watch-metadata[modern-metapanel] #description.ytd-watch-metadata {
    border-radius: 2px;
}
ytd-guide-entry-renderer[guide-refresh] {
    border-radius: 2px;
}
.yt-spec-touch-feedback-shape {
    border-radius: 2px;
}
ytd-rich-metadata-renderer[rounded] {
    border-radius: 2px;
}
#tooltip {
    display: none;
}
body > ytd-app > ytd-popup-container > tp-yt-paper-dialog {
    backdrop-filter: blur(90px);
    background: rgb(0 0 0 / 70%);
    box-shadow: 0px 0px 30px 10000px rgba(0, 0, 0, 0.3);
}
ytd-engagement-panel-section-list-renderer[dialog] #content.ytd-engagement-panel-section-list-renderer {
    background: transparent;
}
#header.ytd-engagement-panel-title-header-renderer {
    background: rgb(0 0 0 / 80%);
    border-bottom: 1px solid rgb(255 255 255 / 5%);
}
ytd-engagement-panel-section-list-renderer[dialog] #header.ytd-engagement-panel-section-list-renderer {
    margin: 0;
}
ytd-engagement-panel-section-list-renderer[dialog] ytd-section-list-renderer.ytd-engagement-panel-section-list-renderer {
    background: rgb(0 0 0 / 50%);
}
ytd-engagement-panel-section-list-renderer[dialog][target-id=engagement-panel-comments-section] {
    width: 40vmax;
}
#menu.ytd-engagement-panel-title-header-renderer:not(:empty) {
    flex: 1;
}
#title-container.ytd-engagement-panel-title-header-renderer {
    max-width: 150px;
}
tp-yt-paper-dialog[modern] {
    box-shadow: 0px 0px 30px 10000px rgb(0 0 0 / 30%);
    border: 1px solid rgb(255 255 255 / 10%);
}
ytd-dismissal-follow-up-renderer[darker-dark-theme][dialog][dialog][dialog] {
    background-color: transparent;
}
ytd-guide-entry-renderer[guide-refresh] #endpoint.yt-simple-endpoint.ytd-guide-entry-renderer:hover, ytd-guide-entry-renderer[guide-refresh] #endpoint.yt-simple-endpoint.ytd-guide-entry-renderer:focus {
    border-radius: 2px;
}
ytd-guide-entry-renderer[guide-refresh] #endpoint.yt-simple-endpoint.ytd-guide-entry-renderer:active {
    border-radius: 2px;
}
ytd-guide-entry-renderer[guide-refresh] yt-interaction.ytd-guide-entry-renderer {
    border-radius: 2px;
}
#search-clear-button > ytd-button-renderer > yt-button-shape > button {
    margin-right: 6px;
}
</style>`;
        document.getElementById("country-code").innerText="BLACK";
    }
})();

QingJ © 2025

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