A pitch black userstyle for YouTube with a number of small tweaks and improvements.
YouTube Black Edition by billycool
Imported and mirrored from https://github.com/BillyCool/UserStyles/raw/master/YouTube-Black-Edition/youtube-black-edition.user.css
Details
Authorbillycool
LicenseGPL-3.0-or-later
Categoryyoutube.com
Created
Updated
Size7.9 kB
Statistics
Learn how we calculate statistics in the FAQ.
Failed to fetch stats.
Description
Notes
Installation
Features
- [Global] Customize background color, comes black by default
- [Global] Customize thumbnail roundness
- [Subscriptions] Hide shorts
- [Subscriptions] Hide upcoming videos
- [Player] Hide reply and next buttons in the video player
- [Player] Hide merch shelf
- [Player] Hide membership 'Join' buttons
- [Player] Hide 'Share' button
- [Player] Hide 'Thanks' button
- [Player] Hide 'Clip' button
- [Player] Hide 'Save' to playlist button
- [Player] Hide 3-dot button
- [Player] Hide links in video description text
- [Player] Hide video description text
- [Player] Hide video description chapters
- [Player] Hide video description channel info
- [YouTube Blocker] Only show block icon when hovering a video
Source code
/* ==UserStyle==
@name 「YouTube Black Edition」
@namespace BillyCool
@version 1.4.2
@description A pitch black userstyle for YouTube with a number of small tweaks and improvements.
@author BillyCool
@homepageURL https://github.com/BillyCool/UserStyles/tree/master/YouTube-Black-Edition
@license GPL-3.0-or-later
@preprocessor stylus
@var color bg-1 "[Global] Background color" #000
@var range thumbnail-roundness "[Global] Thumbnail roundness" [12, 0, 16, 1, "px"]
@var range grid-size "[Subscriptions] Grid size" [0, 0, 120, 10]
@var checkbox hide-avatar "[Subscriptions] Hide channel avatar" 0
@var checkbox hide-upcoming "[Subscriptions] Hide upcoming videos" 0
@var checkbox hide-shorts "[Subscriptions] Hide shorts section" 0
@var checkbox hide-prev-next "[Player] Hide replay and next buttons in video player" 0
@var checkbox hide-merch "[Player] Hide merch shelf" 0
@var checkbox hide-join "[Player] Hide membership join buttons" 0
@var checkbox hide-share "[Player] Hide share button" 0
@var checkbox hide-thanks "[Player] Hide thanks button" 0
@var checkbox hide-clip "[Player] Hide clip button" 0
@var checkbox hide-save "[Player] Hide save to playlist button" 0
@var checkbox hide-three-dot "[Player] Hide 3-bot button" 0
@var checkbox hide-desc-links "[Player] Hide links in video description text" 0
@var checkbox hide-desc "[Player] Hide video description text" 0
@var checkbox hide-desc-transcript "[Player] Hide video description transcript" 0
@var checkbox hide-desc-chapters "[Player] Hide video description chapters" 0
@var checkbox hide-desc-music "[Player] Hide video description music info" 0
@var checkbox hide-desc-info-cards "[Player] Hide video description info cards" 0
@var checkbox hide-desc-channel "[Player] Hide video description channel info" 0
@var checkbox hide-comment-links "[Comments] Hide comments with external links" 0
@var checkbox hide-comment-translate "[Comments] Hide comments translate button" 0
@var checkbox hover-block "[Youtube Blocker] Show block icon on hover only" 0
==/UserStyle== */
@-moz-document domain("youtube.com") {
/* Variable declarations */
bg-2 = lighten(bg-1, 5%);
bg-3 = lighten(bg-1, 8%);
bg-4 = lighten(bg-1, 12%);
bg-5 = lighten(bg-1, 16%);
html[dark], [dark] {
--yt-spec-base-background: bg-1;
--yt-spec-general-background-a: bg-3;
--yt-spec-menu-background: bg-2;
--yt-spec-mono-tonal-hover: bg-4;
--yt-spec-badge-chip-background: bg-3;
--yt-spec-button-chip-background-hover: bg-4;
--yt-spec-additive-background: bg-3;
--yt-spec-static-overlay-button-secondary: bg-4;
--ytd-searchbox-background: bg-1;
--ytd-searchbox-legacy-button-color: bg-3;
--ytd-searchbox-legacy-button-hover-color: bg-4;
--paper-tooltip-background: bg-4;
}
ytd-masthead[frosted-glass] #background.ytd-masthead {
background: var(--yt-spec-base-background);
}
#actions-inner {
width: 100% !important;
}
.ytp-ce-video.ytp-ce-large-round,
.ytp-ce-playlist.ytp-ce-large-round,
.ytp-ce-large-round .ytp-ce-expanding-overlay-background,
.ytp-videowall-still-round-large .ytp-videowall-still-image,
ytd-thumbnail a.ytd-thumbnail,
ytd-thumbnail::before {
border-radius: thumbnail-roundness !important;
}
if (hide-upcoming) {
ytd-rich-item-renderer:has([aria-label="Upcoming"]) {
display: none !important;
}
}
if (hide-shorts) {
#contents ytd-rich-section-renderer:has(ytd-rich-shelf-renderer[is-shorts=""]) {
display: none !important;
}
}
if (hide-prev-next) {
.ytp-prev-button, .ytp-next-button {
display: none !important;
}
}
if (hide-watch-later) {
#hover-overlays .ytd-thumbnail[aria-label="Watch later"] {
display: none !important;
}
}
if (hide-add-queue) {
#hover-overlays .ytd-thumbnail[aria-label="Add to queue"] {
display: none !important;
}
}
if (hide-merch) {
ytd-merch-shelf-renderer, .ytp-featured-product-container {
display: none !important;
}
}
if (hide-join) {
.ytd-recognition-shelf-renderer, #sponsor-button {
display: none !important;
}
}
if (hide-share) {
yt-button-view-model:has(button[aria-label="Share"]) {
display: none !important;
}
}
if (hide-thanks) {
yt-button-view-model:has(button[aria-label="Thanks"]) {
display: none !important;
}
}
if (hide-clip) {
yt-button-view-model:has(button[aria-label="Clip"]) {
display: none !important;
}
}
if (hide-save) {
yt-button-view-model:has(button[aria-label="Save to playlist"]) {
display: none !important;
}
}
if (hide-three-dot) {
yt-button-shape:has(button[aria-label="More actions"]) {
display: none !important;
}
}
if (hide-desc-links) {
.yt-core-attributed-string--link-inherit-color > a {
display: none !important;
}
}
if (hide-desc) {
#description-inline-expander .ytd-text-inline-expander:not(#collapse) {
display: none !important;
}
}
if (hide-desc-transcript) {
ytd-structured-description-content-renderer ytd-video-description-transcript-section-renderer {
display: none !important;
}
}
if (hide-desc-chapters) {
ytd-structured-description-content-renderer ytd-horizontal-card-list-renderer[modern-chapters=""] {
display: none !important;
}
}
if (hide-desc-music) {
ytd-structured-description-content-renderer ytd-horizontal-card-list-renderer[has-subtitle=""] {
display: none !important;
}
}
if (hide-desc-info-cards) {
ytd-structured-description-content-renderer #infocards-section {
display: none !important;
}
}
if (hide-desc-channel) {
ytd-structured-description-content-renderer ytd-video-description-infocards-section-renderer {
display: none !important;
}
}
if (hide-comment-links) {
ytd-comment-thread-renderer:has(> ytd-comment-view-model #content-text a[target="_blank"]),
ytd-comment-thread-renderer ytd-comment-replies-renderer ytd-comment-view-model:has(#content-text a[target="_blank"]) {
display: none !important;
}
}
if (hide-comment-translate) {
ytd-comment-view-model .translate-button {
display: none !important;
}
}
if (hover-block) {
ytd-thumbnail {
.ytbck-quickblock {
display: none !important;
~/:hover ^[1..-1] {
display: block !important;
background: var(--yt-spec-general-background-a) !important;
}
}
}
}
if (hide-avatar) {
#contents ytd-rich-item-renderer #avatar-container {
display: none;
}
}
ytd-two-column-browse-results-renderer[page-subtype="subscriptions"] #contents ytd-rich-item-renderer {
width: "calc(var(--ytd-rich-item-row-usable-width) / (var(--ytd-rich-grid-items-per-row) * (1 + %s / 100)) - var(--ytd-rich-grid-item-margin))" % grid-size;
margin: 0 calc(var(--ytd-rich-grid-item-margin) / 4) 12px calc(var(--ytd-rich-grid-item-margin) / 4);
if (grid-size >= 50) {
#metadata-line, #byline-container {
font-size: 1.2rem;
line-height: 1.8rem;
}
}
}
}