Youtube Black Mode

Youtube in Black instead of gray for the latest YouTube UI (turn on youtube dark mode for good results)

Verze ze dne 15. 02. 2023. Zobrazit nejnovější verzi.

// ==UserScript==
// @name        Youtube Black Mode
// @version     2.10
// @date        2023-02-15
// @author      Paul Reiner
// @description Youtube in Black instead of gray for the latest YouTube UI (turn on youtube dark mode for good results)
// @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: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 / 98%);
}
#ytp-id-18 {
    background:rgb(0 0 0 / 98%);
    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 / 98%);
    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.yt-spec-button-shape-next--filled.yt-spec-button-shape-next--mono.yt-spec-button-shape-next--size-m {
    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.yt-spec-button-shape-next--filled.yt-spec-button-shape-next--mono.yt-spec-button-shape-next--size-m[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;
}
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] {
    background: rgb(0 0 0 / 98%);
    border: 1px solid rgb(255 255 255 / 10%);
}
tp-yt-iron-overlay-backdrop.opened {
    opacity: 0.6
}
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;
}
.yt-spec-button-shape-next--size-s {
    border-radius: 2px;
}
button.yt-spec-button-shape-next.yt-spec-button-shape-next--text.yt-spec-button-shape-next--call-to-action.yt-spec-button-shape-next--size-m.yt-spec-button-shape-next--icon-leading.yt-spec-button-shape-next--align-by-text:hover {
    background-color: rgb(38 56 80 / 55%);
}
.yt-spec-button-shape-next--size-l {
    border-radius: 2px;
}
.yt-spec-button-shape-next--size-l.yt-spec-button-shape-next--icon-button {
    width: 44px;
    height: 44px;
}
</style>`;
        document.getElementById("country-code").innerText="BLACK";
    }
})();