/* ==UserStyle== @name Youtube Tweaks @version 2.1.17 @namespace https://github.com/StylusThemes @description Tweaks for Youtube! @author StylusThemes @homepageURL https://github.com/StylusThemes/YouTube-Tweaks @supportURL https://github.com/StylusThemes/YouTube-Tweaks/issues @updateURL https://raw.githubusercontent.com/StylusThemes/YouTube-Tweaks/master/youtube-tweaks.user.styl @preprocessor stylus @license CC-BY-SA-4.0 @var number videos-per-row "🎥 Number of videos per row" 0; @var checkbox smaller-font "🗛 Use smaller font in video grid" 0; @var checkbox show-full-titles "🎥 Display full video titles" 0; @var checkbox square-corners "🔲 Use square corners on YouTube" 0; @var checkbox hide-shorts "🩳 Hide YouTube Shorts" 0; @var checkbox hide-channel-banners "🚫 Hide channel banners" 0; @var checkbox filter-search-results "🔎 Filter irrelevant search results" 0; @var checkbox hide-promo-bar "🚫 Hide promotional bar" 0; @var checkbox compact-header "✂️ Use compact header bar" 0; @var checkbox smaller-search "🔍 Smaller search result thumbnails" 0; @var checkbox hide-recommendations-bar "🚫 Hide recommendations topic bar" 0; @var checkbox hide-yt-posts "🚫 Hide latest YouTube posts" 0; @var checkbox hide-video-summary "🚫 Hide video summary box" 0; @var checkbox restore-watched-badge "👀 Restore YouTube watched badge" 0; @var checkbox reorder-sidebar "🔀 Reorder sidebar sections" 0; @var checkbox enable-theater-mode "🎭 Enable fullscreen theater mode" 0; @var checkbox stretch-video "📺 Stretch video to fill player" 0; @var checkbox hide-buttons "🚫 Hide Download, Clip, Thanks, and Promote buttons" 0; @var checkbox hide-suggestion-cards "🚫 Hide suggestion cards (unless hovering)" 0; @var checkbox hide-end-cards "🚫 Hide end cards" 0; @var checkbox enable-netflix-subtitles "🍿 Enable Netflix-style subtitles" 0; ==/UserStyle== */ @-moz-document url-prefix("https://www.youtube.com") { #copyright div::after { white-space: pre; content: "\aYoutube Tweaks - Version 2.1.17"; } if videos-per-row { ytd-rich-grid-renderer, ytd-rich-item-renderer[is-responsive-grid="STANDARD"]:not([is-post]), :root { --ytd-rich-grid-items-per-row: videos-per-row !important; } ytd-rich-section-renderer { order: -1; } #home-container-media .rich-grid-media-skeleton { max-width: "calc(100%/%s - 16px)" % videos-per-row !important; min-width: "calc(100%/%s - 16px)" % videos-per-row !important; } 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) !important; max-width: calc(var(--ytd-rich-grid-items-per-row) * (var(--ytd-rich-grid-item-max-width) + var(--ytd-rich-grid-item-margin))) !important; } ytd-rich-item-renderer:nth-child(n + 3):nth-child(-n + {videos-per-row}):has(#video-title.ytd-rich-grid-media)[hidden] { display: block !important; } [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) !important; margin-left: calc(var(--ytd-rich-grid-item-margin)/2) !important; margin-right: calc(var(--ytd-rich-grid-item-margin)/2) !important; } [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 smaller-font { :root { --smaller-font-1-4rem: 1.4rem; --smaller-font-2rem: 2rem; --smaller-font-1-2rem: 1.2rem; --smaller-font-1-8rem: 1.8rem; } ytd-rich-item-renderer .yt-lockup-metadata-view-model-wiz__title, #video-title[class*="style-scope ytd-rich-grid"], ytd-game-details-renderer[is-rich-grid]:not([mini-mode]) #title.ytd-game-details-renderer, yt-lockup-metadata-view-model .yt-lockup-metadata-view-model__title { font-size: 1.4rem !important; line-height: 2rem !important; } ytd-rich-item-renderer .yt-content-metadata-view-model-wiz__metadata-text, .ytd-rich-grid-media ytd-video-meta-block[rich-meta] .ytd-video-meta-block:is(#byline-container, #metadata-line), yt-lockup-metadata-view-model .yt-content-metadata-view-model__metadata-text { font-size: 1.2rem !important; line-height: 1.8rem !important; } } if show-full-titles { ytd-rich-item-renderer .yt-lockup-metadata-view-model-wiz__title, ytd-grid-video-renderer #video-title.yt-simple-endpoint.ytd-grid-video-renderer, ytd-rich-grid-media[mini-mode] #video-title.ytd-rich-grid-media, ytd-rich-grid-media #video-title:not(.ta-title-container), ytd-rich-grid-slim-media[mini-mode] #video-title.ytd-rich-grid-slim-media, ytd-video-renderer[is-backstage-video] #video-title.ytd-video-renderer, #video-title[class*="ytd"], yt-lockup-metadata-view-model .yt-lockup-metadata-view-model__title { -webkit-line-clamp: 20 !important; max-height: 44rem !important; } [class*="yt-lockup-metadata-view-model__heading-reset"] { --cb-max-height: 100% !important; } } if square-corners { * { border-radius: 0 !important; } } if hide-shorts { #dismissible.ytd-compact-video-renderer:has([href*="/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/"]), #sections .ytd-guide-renderer:first-child ytd-guide-entry-renderer:nth-child(2), .style-scope .ytd-mini-guide-renderer:nth-child(2), a[title="Shorts"], grid-shelf-view-model, ytd-notification-renderer:has([href*="/shorts/"]), ytd-reel-shelf-renderer, ytd-reel-shelf-renderer:has([href*="/shorts/"]), ytd-video-renderer:has([href*="/shorts/"]), ytd-rich-item-renderer:has([href*="/shorts/"]):not([is-slim-media]), ytd-rich-section-renderer:has([is-shorts]), [page-subtype="subscriptions"] ytd-item-section-renderer:has([href*="/shorts/"]), [page-subtype="subscriptions"] ytd-rich-shelf-renderer[is-shorts], [page-subtype="channels"] .yt-tab-shape-wiz--host-clickable[tab-title="Shorts"], [page-subtype="hashtag-landing-page"] .yt-tab-shape-wiz--host-clickable[tab-title="Shorts"], yt-tab-shape[tab-title="Shorts"] { display: none !important; } } if hide-channel-banners { #page-header-banner { display: none !important; } } [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 filter-search-results; } if hide-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 !important; } } if compact-header { 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) !important; } .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); } yt-searchbox, .ytd-searchbox:is(#search-form, #search-icon-legacy) { height: 30px !important; } 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, .ytSearchboxComponentClearButton { width: 30px !important; height: 30px !important; padding: 3px; } .ytSearchboxComponentSuggestionsContainer { top: 30px; } yt-icon.ytd-logo { padding-top: 8px; padding-bottom: 8px; } #container.ytd-masthead, #header.ytd-app { padding: 0 21px; } } if smaller-search { ytd-two-column-search-results-renderer[use-bigger-thumbs][bigger-thumbs-style=BIG] #primary.ytd-two-column-search-results-renderer, ytd-search[has-search-header][has-bigger-thumbs] #header.ytd-search { max-width: 1096px !important; } ytd-channel-renderer[use-bigger-thumbs][bigger-thumb-style=BIG] #avatar-section.ytd-channel-renderer, ytd-channel-renderer[use-bigger-thumbs] #avatar-section.ytd-channel-renderer, ytd-video-renderer[use-bigger-thumbs][bigger-thumbs-style=BIG] ytd-thumbnail.ytd-video-renderer, ytd-video-renderer[use-search-ui] ytd-thumbnail.ytd-video-renderer, ytd-playlist-renderer[use-bigger-thumbs][bigger-thumbs-style=BIG] ytd-playlist-thumbnail.ytd-playlist-renderer, ytd-playlist-renderer[use-bigger-thumbs] ytd-playlist-thumbnail.ytd-playlist-renderer, ytd-radio-renderer[use-bigger-thumbs][bigger-thumbs-style=BIG] ytd-thumbnail.ytd-radio-renderer, ytd-radio-renderer[use-bigger-thumbs] ytd-thumbnail.ytd-radio-renderer, ytd-radio-renderer[use-bigger-thumbs][bigger-thumbs-style=BIG] ytd-thumbnail.ytd-radio-renderer, ytd-radio-renderer[use-bigger-thumbs][bigger-thumbs-style=BIG] ytd-playlist-thumbnail.ytd-radio-renderer, ytd-movie-renderer[use-bigger-thumbs][bigger-thumbs-style=BIG] .thumbnail-container.ytd-movie-renderer, ytd-movie-renderer[use-bigger-thumbs] .thumbnail-container.ytd-movie-renderer, ytd-promoted-video-renderer[use-bigger-thumbs][bigger-thumbs-style=BIG] ytd-thumbnail.ytd-promoted-video-renderer, ytd-promoted-sparkles-web-renderer[web-search-layout][use-bigger-thumbs][bigger-thumbs-style=BIG] #thumbnail-container.ytd-promoted-sparkles-web-renderer, ytd-text-image-no-button-layout-renderer[use-bigger-thumbs][bigger-thumbs-style=BIG] #text-image-container.ytd-text-image-no-button-layout-renderer, .yt-lockup-view-model-wiz--horizontal .yt-lockup-view-model-wiz__content-image, .yt-lockup-view-model--horizontal .yt-lockup-view-model__content-image { max-width: 360px !important; } } if hide-recommendations-bar { [page-subtype="home"] ytd-feed-filter-chip-bar-renderer, #home-chips, yt-related-chip-cloud-renderer { display: none; } #frosted-glass { height: var(--ytd-toolbar-height) !important; } } ytd-rich-section-renderer:has([is-post]) { display: none if hide-yt-posts; } #video-summary, #expandable-metadata.ytd-video-renderer:not(:empty) { display: none if hide-video-summary; } if restore-watched-badge { @font-face { font-family: "FontAwesome"; src: url("https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/fonts/fontawesome-webfont.eot?v=4.7.0"); src: url("https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/fonts/fontawesome-webfont.eot?#iefix&v=4.7.0") format("embedded-opentype"), url("https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/fonts/fontawesome-webfont.woff2?v=4.7.0") format("woff2"), url("https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/fonts/fontawesome-webfont.woff?v=4.7.0") format("woff"), url("https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/fonts/fontawesome-webfont.ttf?v=4.7.0") format("truetype"), url("https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular") format("svg"); font-weight: normal; font-style: normal; } .ytThumbnailBottomOverlayViewModelHost { position: absolute; top: 0; bottom: 0; left: 0; right: 0; } .resume-playback-background, ytd-thumbnail-overlay-resume-playback-renderer, .ytThumbnailOverlayProgressBarHostWatchedProgressBar { background: rgba(3, 3, 3, .8) !important; position: absolute; left: 0; top: 0; display: block !important; height: 100%; width: 100%; pointer-events: none; opacity: 1; z-index: 11; font-size: 12px; text-align: center; transition: background .2s; } .resume-playback-background::before, ytd-thumbnail-overlay-resume-playback-renderer::before, .ytThumbnailOverlayProgressBarHostWatchedProgressBar::before { content: "\f00c"; visibility: visible; font-family: "FontAwesome"; color: white; box-sizing: border-box; width: auto; height: 100%; line-height: normal; padding: 1px 5px; display: flex; position: relative; z-index: 14; opacity: .9; pointer-events: none; font-size: 32px; transition: opacity .2s; flex-direction: row; align-items: center; justify-content: center; } .yt-lockup-thumbnail:hover .resume-playback-background::before, .thumb-wrapper:hover .resume-playback-background::before, #thumbnail:hover ytd-thumbnail-overlay-resume-playback-renderer::before, yt-thumbnail-view-model:hover .ytThumbnailOverlayProgressBarHostWatchedProgressBar::before { opacity: 0; transition: opacity .2s; } .yt-lockup-thumbnail:hover .resume-playback-background, .thumb-wrapper:hover .resume-playback-background, #thumbnail:hover ytd-thumbnail-overlay-resume-playback-renderer, yt-thumbnail-view-model:hover .ytThumbnailOverlayProgressBarHostWatchedProgressBar, #thumbnail:hover #progress.ytd-thumbnail-overlay-resume-playback-renderer::after, yt-thumbnail-view-model:hover .ytThumbnailOverlayProgressBarHostWatchedProgressBarSegment::after { background: rgba(0, 0, 0, 0) !important; transition: background .2s; } #progress.ytd-thumbnail-overlay-resume-playback-renderer, .ytThumbnailOverlayProgressBarHostWatchedProgressBar .ytThumbnailOverlayProgressBarHostWatchedProgressBarSegment { background: none !important; height: 100% !important; bottom: 0px !important; position: absolute !important; } #progress.ytd-thumbnail-overlay-resume-playback-renderer::after, .ytThumbnailOverlayProgressBarHostWatchedProgressBarSegment::after { content: ""; background-color: rgba(0, 0, 0, .65); position: absolute; left: 0; right: 0; top: 0; bottom: 0; z-index: -1; } .ytThumbnailBottomOverlayViewModelHost { display: none; } } if reorder-sidebar { ytd-guide-renderer #sections { display: flex !important; flex-direction: column !important; } ytd-guide-renderer #sections > ytd-guide-section-renderer { order: 3 !important; } ytd-guide-renderer #sections > ytd-guide-section-renderer:first-of-type { order: 1 !important; } ytd-guide-renderer #sections > ytd-guide-section-renderer:has(a[href = "/feed/you"]) { order: 1 !important; } ytd-guide-renderer #sections > ytd-guide-section-renderer:has(a[href = "/feed/subscriptions"]) { order: 2 !important; } } } @-moz-document regexp("https?://www.youtube.com/watch.*"), regexp("https?://www.youtube.com/clip.*"), regexp("https?://www.youtube.com/embed.*"), regexp("https?://www.youtube.com/live.*") { if enable-theater-mode { ytd-watch-flexy[theater]:not([fullscreen]) #full-bleed-container.ytd-watch-flexy { height: 100vh !important; max-height: none !important; margin-top: calc(0px - var(--ytd-toolbar-height)) !important; } ytd-watch-flexy[fixed-panels] #chat.ytd-watch-flexy, ytd-app[fullscreen] #page-manager > ytd-watch-flexy[theater]{ top: 0 !important; } #player.skeleton.theater { height: 100vh !important; margin-top: 0 !important; max-height: none !important; } #masthead[is-watch-page][theater]:not([fullscreen]) { position: absolute !important; transform: translateY(calc(0px - var(--ytd-toolbar-height))) !important; padding-bottom: 20px !important; transition: transform .3s ease, padding .3s ease !important; } #masthead[is-watch-page][theater]:not([fullscreen]):hover { transform: initial !important; padding-bottom: 0 !important; } } if stretch-video { video { position: static !important; width: 100% !important; height: 100vh !important; transform: scaleX(1) !important; object-fit: fill !important; } #player-full-bleed-container.ytd-watch-flexy { position: unset; } } if hide-buttons { ytd-download-button-renderer { display: none !important; } #flexible-item-buttons [aria-label="Promote"], #flexible-item-buttons [aria-label="Clip"], #flexible-item-buttons [aria-label="Thanks"], #flexible-item-buttons [title="Show support with Super Thanks"] { display: none !important; } } if hide-suggestion-cards { .ytp-endscreen-content, .ytp-fullscreen-grid-stills-container { opacity: 0; transform: scale(.95); transition: opacity .5s ease-out, transform .5s ease-out; } .ytp-endscreen-content:hover, .ytp-fullscreen-grid-stills-container:hover { opacity: 1; transform: scale(1); } div[class="ytp-videowall-still-image"]:not(.cb-visible) { visibility: visible !important; } } .ytp-fullscreen-grid-active.html5-video-player.ended-mode .ytp-fullscreen-grid { display: none; } .ytp-fullscreen-grid-active.html5-video-player.ended-mode .html5-endscreen { display: initial; } .ytp-ce-element-show { display: none if hide-end-cards; } if enable-netflix-subtitles { @font-face { font-family: "Netflix Sans"; font-weight: 100; src: url("https://assets.nflxext.com/ffe/siteui/fonts/netflix-sans/v3/NetflixSans_W_Th.woff2") format("woff2"), url("https://assets.nflxext.com/ffe/siteui/fonts/netflix-sans/v3/NetflixSans_W_Th.woff") format("woff"); } @font-face { font-family: "Netflix Sans"; font-weight: 300; src: url("https://assets.nflxext.com/ffe/siteui/fonts/netflix-sans/v3/NetflixSans_W_Lt.woff2") format("woff2"), url("https://assets.nflxext.com/ffe/siteui/fonts/netflix-sans/v3/NetflixSans_W_Lt.woff") format("woff"); } @font-face { font-family: "Netflix Sans"; font-weight: 400; src: url("https://assets.nflxext.com/ffe/siteui/fonts/netflix-sans/v3/NetflixSans_W_Rg.woff2") format("woff2"), url("https://assets.nflxext.com/ffe/siteui/fonts/netflix-sans/v3/NetflixSans_W_Rg.woff") format("woff"); } @font-face { font-family: "Netflix Sans"; font-weight: 700; src: url("https://assets.nflxext.com/ffe/siteui/fonts/netflix-sans/v3/NetflixSans_W_Md.woff2") format("woff2"), url("https://assets.nflxext.com/ffe/siteui/fonts/netflix-sans/v3/NetflixSans_W_Md.woff") format("woff"); } @font-face { font-family: "Netflix Sans"; font-weight: 800; src: url("https://assets.nflxext.com/ffe/siteui/fonts/netflix-sans/v3/NetflixSans_W_Bd.woff2") format("woff2"), url("https://assets.nflxext.com/ffe/siteui/fonts/netflix-sans/v3/NetflixSans_W_Bd.woff") format("woff"); } @font-face { font-family: "Netflix Sans"; font-weight: 900; src: url("https://assets.nflxext.com/ffe/siteui/fonts/netflix-sans/v3/NetflixSans_W_Blk.woff2") format("woff2"), url("https://assets.nflxext.com/ffe/siteui/fonts/netflix-sans/v3/NetflixSans_W_Blk.woff") format("woff"); } .ytp-caption-segment { font-family: "Netflix Sans", sans-serif !important; font-weight: 700 !important; background: none !important; text-shadow: #000 0 0 .2em !important; } } }