Tweaks for Youtube!
Youtube Tweaks by journeyover
Imported and mirrored from https://github.com/StylusThemes/YouTube-Tweaks/raw/refs/heads/master/youtube-tweaks.user.styl
Details
Authorjourneyover
LicenseCC-BY-SA-4.0
Categoryyoutube.com
Created
Updated
Size17 kB
Statistics
Learn how we calculate statistics in the FAQ.
Failed to fetch stats.
Description
Notes
Userstyle doesn't have notes.Source code
Source code has over 10K characters, so we truncated it. You can inspect the full source code on install link./* ==UserStyle==
@name Youtube Tweaks
@version 2.0.2
@namespace https://github.com/StylusThemes
@description Tweaks for Youtube!
@author StylusThemes <https://github.com/StylusThemes>
@homepageURL https://github.com/StylusThemes/YouTube-Tweaks
@supportURL https://github.com/StylusThemes/YouTube-Tweaks/issues
@preprocessor stylus
@license CC-BY-SA-4.0
@var number videos-per-row "Videos per row" 0
@var checkbox compact-header-bar "Compact header bar" 0
@var checkbox font-size "Video grid: Decrease font size" 0;
@var checkbox no-rounded-corners "Square YouTube" 0
@var checkbox no-shorts "Shorts blocker" 0
@var checkbox no-promo-bar "No promo bar" 0
@var checkbox search-dismissible "No irrelevant search results" 0
@var checkbox no-yt-posts "Hide Latest YouTube Posts" 0
@var checkbox no-recomendations-bar "No topic bar" 0
@var checkbox theater "Fullscreen theater mode" 0
@var checkbox fill-player "Stretch Video To Fill Player" 0
@var checkbox hide-dl-clip-thanks-button "Hide \"Download, Clip, Thanks and Promote buttons\"" 0
@var checkbox netflix-subtitles "Netflix subtitles" 0
@var checkbox youtube-watched-badge "Re-add YouTube Watched Badge" 0
@var checkbox return-red-youtube "Return Red YouTube" 0
==/UserStyle== */
@-moz-document url-prefix("https://www.youtube.com") {
i=!important;
t=transparent;
#copyright div::after {
white-space: pre;
content: "\aYoutube Tweaks - Version 2.0.2";
}
if videos-per-row {
ytd-rich-grid-renderer,
:root {
--ytd-rich-grid-items-per-row: videos-per-row i;
}
ytd-rich-section-renderer {
order: -1;
}
#home-container-media .rich-grid-media-skeleton {
max-width: "calc(100%/%s - 16px)" % videos-per-row i;
min-width: "calc(100%/%s - 16px)" % videos-per-row i;
}
ytd-rich-grid-media[mini-mode],
ytd-rich-grid-renderer[is-slim-grid] #contents.ytd-rich-grid-renderer {
max-width: initial;
}
ytd-two-column-browse-results-renderer[page-subtype="channels"]:has(ytd-rich-grid-renderer:not([is-shorts-grid])) {
width: calc(100% - 32px) i;
max-width: calc(var(--ytd-rich-grid-items-per-row) * (var(--ytd-rich-grid-item-max-width) + var(--ytd-rich-grid-item-margin))) i;
}
ytd-rich-item-renderer:nth-child(n + 3):nth-child(-n + {videos-per-row}):has(#video-title.ytd-rich-grid-media)[hidden] {
display: block i;
}
[style="--ytd-rich-shelf-items-count: 3;"]:has(#video-title.ytd-rich-grid-media) .expand-collapse-button.ytd-rich-shelf-renderer {
display: none if videos-per-row > "2";
}
[style="--ytd-rich-shelf-items-count: 4;"]:has(#video-title.ytd-rich-grid-media) .expand-collapse-button.ytd-rich-shelf-renderer {
display: none if videos-per-row > "3";
}
[style="--ytd-rich-shelf-items-count: 5;"]:has(#video-title.ytd-rich-grid-media) .expand-collapse-button.ytd-rich-shelf-renderer {
display: none if videos-per-row > "4";
}
[style="--ytd-rich-shelf-items-count: 6;"]:has(#video-title.ytd-rich-grid-media) .expand-collapse-button.ytd-rich-shelf-renderer {
display: none if videos-per-row > "5";
}
[style="--ytd-rich-shelf-items-count: 7;"]:has(#video-title.ytd-rich-grid-media) .expand-collapse-button.ytd-rich-shelf-renderer {
display: none if videos-per-row > "6";
}
[style="--ytd-rich-shelf-items-count: 8;"]:has(#video-title.ytd-rich-grid-media) .expand-collapse-button.ytd-rich-shelf-renderer {
display: none if videos-per-row > "7";
}
[style="--ytd-rich-shelf-items-count: 9;"]:has(#video-title.ytd-rich-grid-media) .expand-collapse-button.ytd-rich-shelf-renderer {
display: none if videos-per-row > "8";
}
[style="--ytd-rich-shelf-items-count: 10;"]:has(#video-title.ytd-rich-grid-media) .expand-collapse-button.ytd-rich-shelf-renderer {
display: none if videos-per-row > "9";
}
[style="--ytd-rich-shelf-items-count: 11;"]:has(#video-title.ytd-rich-grid-media) .expand-collapse-button.ytd-rich-shelf-renderer {
display: none if videos-per-row > "10";
}
[style="--ytd-rich-shelf-items-count: 12;"]:has(#video-title.ytd-rich-grid-media) .expand-collapse-button.ytd-rich-shelf-renderer {
display: none if videos-per-row > "11";
}
}
#content.ytd-rich-section-renderer {
margin: 0 8px;
}
ytd-rich-item-renderer[rendered-from-rich-grid] {
width: calc(100% / var(--ytd-rich-grid-items-per-row) - var(--ytd-rich-grid-item-margin) - .01px) i;
margin-left: calc(var(--ytd-rich-grid-item-margin)/2) i;
margin-right: calc(var(--ytd-rich-grid-item-margin)/2) i;
}
[is-default-grid] > #contents.ytd-rich-grid-renderer {
width: calc(100% - 32px);
max-width: calc(var(--ytd-rich-grid-items-per-row) * (var(--ytd-rich-grid-item-max-width) + var(--ytd-rich-grid-item-margin)));
}
.skeleton-bg-color.ytd-ghost-grid-renderer,
ytd-rich-item-renderer:has(ytd-ad-slot-renderer) {
display: none;
}
if font-size {
:root {
--smaller-font-1-4rem: 1.4rem;
--smaller-font-2rem: 2rem;
--smaller-font-1-2rem: 1.2rem;
--smaller-font-1-8rem: 1.8rem;
}
#video-title[class*="style-scope ytd-rich-grid"],
ytd-game-details-renderer[is-rich-grid]:not([mini-mode]) #title.ytd-game-details-renderer {
font-size: 1.4rem;
line-height: 2rem;
}
.ytd-rich-grid-media ytd-video-meta-block[rich-meta] .ytd-video-meta-block:is(#byline-container, #metadata-line) {
font-size: 1.2rem;
line-height: 1.8rem;
}
}
if no-rounded-corners {
* {
border-radius: 0 i;
}
}
if no-shorts {
#items.ytd-grid-renderer > ytd-grid-video-renderer.ytd-grid-renderer:has([href*="/shorts/"]),
#items.yt-horizontal-list-renderer > *.yt-horizontal-list-renderer:has([href*="/shorts/"]),
ytd-rich-section-renderer:has([is-shorts]),
ytd-rich-item-renderer:has([href*="/shorts/"]):not([is-slim-media]),
ytd-video-renderer:has([href*="/shorts/"]),
ytd-notification-renderer:has([href*="/shorts/"]),
ytd-reel-shelf-renderer:has([href*="/shorts/"]),
[page-subtype="subscriptions"] ytd-item-section-renderer:has([href*="/shorts/"]),
#dismissible.ytd-compact-video-renderer:has([href*="/shorts/"]) {
display: none i;
}
}
if no-promo-bar {
#player-ads,
#attached-survey,
ytd-search-pyv-renderer,
[page-subtype="home"] ytd-rich-section-renderer,
ytd-rich-item-renderer:has(ytd-feed-nudge-renderer),
[page-subtype="subscriptions"] ytd-rich-section-renderer,
#masthead-ad:has(ytd-banner-promo-renderer),
tp-yt-paper-dialog:has(yt-mealbar-promo-renderer),
ytd-rich-item-renderer:has(ytd-ad-slot-renderer),
ytd-rich-item-renderer:has(ytd-ad-slot-renderer),
ytd-rich-item-renderer.ytd-rich-grid-row:has(ytd-ad-slot-renderer),
ytd-rich-item-renderer.ytd-rich-grid-row:has(ytd-feed-nudge-renderer),
ytd-rich-item-renderer:has(ytd-toggle-button-renderer button[aria-label="Notify me"]),
ytd-ad-slot-renderer.ytd-item-section-renderer:has(ytd-promoted-sparkles-web-renderer),
ytd-compact-video-renderer:has(ytd-badge-supported-renderer [aria-label="Members first"]),
[page-subtype="home"] ytd-rich-item-renderer:has(.ytd-playlist-video-thumbnail-renderer),
ytd-watch-next-secondary-results-renderer :is(ytd-ad-slot-renderer, ytd-compact-movie-renderer) {
display: none i;
}
}
[is-search] ytd-shelf-renderer.ytd-item-section-renderer:not(ytd-channel-renderer + ytd-shelf-renderer),
[is-search] ytd-horizontal-card-list-renderer.ytd-item-section-renderer:not(:first-child),
[is-search] ytd-exploratory-results-renderer.ytd-item-section-renderer {
display: none if search-dismissible;
}
if compact-header-bar {
html {
--ytd-toolbar-height: 36px;
}
ytd-feed-filter-chip-bar-renderer {
--ytd-rich-grid-chips-bar-top: var(--ytd-toolbar-height);
}
ytd-app:not([scrolling]) {
--ytd-masthead-height: var(--ytd-toolbar-height) i;
}
.ytd-masthead:is(#container, #background),
#header.ytd-app,
ytd-masthead.shell {
height: var(--ytd-toolbar-height);
}
#player.skeleton.theater {
margin-top: var(--ytd-toolbar-height);
}
.ytd-searchbox:is(#search-form, #search-icon-legacy) {
height: 30px;
}
yt-icon-button:is(.ytd-topbar-menu-button-renderer, .ytd-masthead, .ytd-notification-topbar-button-renderer),
#masthead .yt-spec-button-shape-next--icon-only-default,
#guide-button.ytd-app {
width: 30px;
height: 30px;
padding: 3px;
}
yt-icon.ytd-logo {
padding-top: 8px;
padding-bottom: 8px;
}
#container.ytd-masthead,
#header.ytd-app {
padding: 0 21px;
}
}
if no-recomendations-bar {
[page-subtype="home"] ytd-feed-filter-chip-bar-renderer,
#home-chips,
yt-related-chip-cloud-renderer {
display: none;
}
ytd-masthead[frosted-glass=with-chipbar] #background.ytd-masthead {
height: var(--ytd-toolbar-height);
}
}
ytd-rich-section-renderer:has([is-post]) {
display: none if no-yt-posts;
}
if return-red-youTube {
html[dark], [dark] {
--yt-spec-red-indicator: #f00;
}
html[refresh], [refresh] {
--yt-spec-static-brand-red: #f00;
--yt-spec-static-overlay-background-brand: #f00;
}
ytd-thumbnail-overlay-resume-playback-renderer[enable-refresh-signature-moments-web] #progress.ytd-thumbnail-overlay-resume-playback-renderer,
.YtProgressBarLineProgressBarPlayedRefresh,
.ytp-cairo-refresh-signature-moments .ytp-play-progress,
.badge-style-type-live-now-alternate.ytd-badge-supported-renderer,
.yt-spec-avatar-shape--cairo-refresh.yt-spec-avatar-shape--live-ring::after,
.badge-shape-wiz--thumbnail-live,
#progress.yt-page-navigation-progress {
background: #f00 i;
}
.YtProgressBarLineProgressBarPlayed,
.YtProgressBarPlay...