Last active
June 21, 2024 18:45
-
-
Save insin/b735312d8ff969b1d7e5e18e73b6ea16 to your computer and use it in GitHub Desktop.
Hide YouTube Shorts - use with the Stylus extension: https://github.com/openstyles/stylus#stylus
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
/* Nav item */ | |
a[title="Shorts"], | |
/* Video shelf in Home and Subscriptions */ | |
ytd-rich-shelf-renderer[is-shorts], | |
/* Video shelf in Search */ | |
ytd-reel-shelf-renderer { | |
display: none !important; | |
} | |
@supports selector(:has(*)) { | |
/* "Shorts" chip in Search */ | |
yt-chip-cloud-chip-renderer:has(yt-formatted-string[title="Shorts"]) { | |
display: none !important; | |
} | |
/* Shorts in search results */ | |
ytd-video-renderer:has(a[href^="/shorts"]) { | |
display: none !important; | |
} | |
} | |
@supports not selector(:has(*)) { | |
/* In Firefox < 121 we just hide the second chip in Search */ | |
ytd-search iron-selector[id="chips"] yt-chip-cloud-chip-renderer:nth-child(2) { | |
display: none !important; | |
} | |
/* Can't hide Shorts in search results in Firefox < 121 with just CSS ;_; */ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment