Hide the distracting parts of YouTube!
Last active
June 28, 2024 05:49
-
-
Save phuedx/a438e9b8596bdedcdfcfa01b57762e0d to your computer and use it in GitHub Desktop.
Distraction-free YouTube
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ==UserStyle== | |
@name Distraction-free YouTube | |
@namespace phuedx | |
@version 0.3.0 | |
@description Hide the distracting parts of YouTube! | |
@author Sam Smith (https://github.com/phuedx) | |
@homepageURL https://gist.github.com/phuedx/a438e9b8596bdedcdfcfa01b57762e0d | |
@updateURL https://gist.githubusercontent.com/phuedx/a438e9b8596bdedcdfcfa01b57762e0d/raw/distraction-free-youtube.user.css | |
@license GPL-3.0-or-later | |
@preprocessor stylus | |
@var checkbox hide-shorts "Hide Shorts?" 1 | |
@var checkbox hide-chat "Hide chat replay?" 1 | |
@var checkbox hide-comments "Hide comments?" 1 | |
@var checkbox hide-related "Hide related?" 1 | |
==/UserStyle== */ | |
@-moz-document domain("www.youtube.com") { | |
if (hide-shorts) { | |
a[title="Shorts"] { | |
display: none !important; | |
} | |
ytd-rich-section-renderer:has(ytd-rich-shelf-renderer[is-shorts]) { | |
display: none; | |
} | |
yt-tab-shape[tab-title="Shorts"] { | |
display: none; | |
} | |
ytd-item-section-renderer:has(.ytd-reel-shelf-renderer) { | |
display: none; | |
} | |
ytd-shorts { | |
display: none; | |
} | |
yt-chip-cloud-chip-renderer:has([title="Shorts"]) { | |
display: none; | |
} | |
} | |
if (hide-chat) { | |
#chat-container { | |
display: none; | |
} | |
} | |
if (hide-comments) { | |
#comment-teaser, | |
ytd-item-section-renderer[section-identifier="comment-item-section"] { | |
display: none; | |
} | |
} | |
if (hide-related) { | |
#bottom-grid, | |
#related { | |
display: none !important; | |
} | |
#secondary:has(#playlist[hidden]) { | |
display: none; | |
} | |
#columns:has(#playlist[hidden]) { | |
max-width: none; | |
} | |
#columns:has(#playlist[hidden]) #primary { | |
max-width: none; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment