Skip to content

Instantly share code, notes, and snippets.

@madranet
Last active February 6, 2024 08:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save madranet/01c3040ec16857ca863ac29ace391d9a to your computer and use it in GitHub Desktop.
Save madranet/01c3040ec16857ca863ac29ace391d9a to your computer and use it in GitHub Desktop.
uBlock Origin YouTube Rules
!ALL YOUTUBE ONES TOGETHER
!From here: https://pastebin.com/raw/0Qtubr5M
! YT - Remove unwanted popups and annoyances
youtube.com##ytd-popup-container > tp-yt-paper-dialog > ytd-mealbar-promo-renderer, ytd-popup-container > tp-yt-paper-dialog > yt-mealbar-promo-renderer:has-text(/Claim Offer|Join now|Not Now|No thanks|YouTube TV|live TV|Live TV|movies|sports|Try it free|unlimited DVR|watch NFL/)
youtube.com###upsell-dialog-text > a[href*="sign"]:upward(body > * > *)
youtube.com##ytd-video-quality-promo-renderer
youtube.com###cinematics.ytd-watch-flexy:remove()
www.youtube.com##plasmo-csui
www.youtube.com##ytd-clarification-renderer.style-scope.ytd-watch-flexy
! YT - Remove Shorts on all pages
youtube.com##[is-shorts]
www.youtube.com###guide [title="Shorts"], .ytd-mini-guide-entry-renderer[title="Shorts"]
www.youtube.com##ytd-search ytd-video-renderer [overlay-style="SHORTS"]:upward(ytd-video-renderer)
www.youtube.com##ytd-reel-shelf-renderer
www.youtube.com##[tab-title="Shorts"]
www.youtube.com##ytd-browse[page-subtype="subscriptions"] ytd-grid-video-renderer [overlay-style="SHORTS"]:upward(ytd-grid-video-renderer)
www.youtube.com##ytd-browse[page-subtype="subscriptions"] ytd-video-renderer [overlay-style="SHORTS"]:upward(ytd-item-section-renderer)
www.youtube.com##ytd-browse[page-subtype="subscriptions"] ytd-rich-item-renderer [overlay-style="SHORTS"]:upward(ytd-rich-item-renderer)
www.youtube.com###related ytd-compact-video-renderer [overlay-style="SHORTS"]:upward(ytd-compact-video-renderer)
m.youtube.com##.pivot-shorts:upward(ytm-pivot-bar-item-renderer)
m.youtube.com##ytm-reel-shelf-renderer
m.youtube.com##ytm-search ytm-video-with-context-renderer [data-style="SHORTS"]
! YT - Cleanup related video elements from watch sidebar
www.youtube.com##ytd-compact-video-renderer #video-title:not(:is([aria-label*=",0"],[aria-label*=",1"],[aria-label*=",2"],[aria-label*=",3"],[aria-label*=",4"],[aria-label*=",5"],[aria-label*=",6"],[aria-label*=",7"],[aria-label*=",8"],[aria-label*=",9"])):upward(ytd-compact-video-renderer)
www.youtube.com##ytd-compact-video-renderer:has(#video-title:not(:is([aria-label*=",0"],[aria-label*=",1"],[aria-label*=",2"],[aria-label*=",3"],[aria-label*=",4"],[aria-label*=",5"],[aria-label*=",6"],[aria-label*=",7"],[aria-label*=",8"],[aria-label*=",9"])))
youtube.com###related ytd-compact-video-renderer:has(#video-title:is([title*="#shorts"]))
youtube.com###related ytd-compact-video-renderer:has(#video-title:is([title*="#Shorts"]))
youtube.com###related ytd-compact-video-renderer:has(#video-title:is([title*="#short"]))
youtube.com###related ytd-compact-video-renderer:has(#video-title:is([title*="#Short"]))
www.youtube.com##ytd-item-section-renderer.style-scope.ytd-watch-next-secondary-results-renderer > div#contents.style-scope.ytd-item-section-renderer > ytd-reel-shelf-renderer.style-scope.ytd-item-section-renderer
www.youtube.com##ytd-reel-shelf-renderer.ytd-structured-description-content-renderer
youtube-nocookie.com,youtube.com##.ytp-pause-overlay, .show-video-thumbnail-button
~youtube-nocookie.com,~youtube.com##iframe ~ #topvbar > #rvid
! YT - Remove unwanted items from search results
youtube.com##ytd-shelf-renderer:has-text(/People also watched/)
youtube.com###contents > ytd-shelf-renderer:has-text(/For you/)
!youtube.com##ytd-shelf-renderer:has-text(/Previously watched/)
!youtube.com##ytd-shelf-renderer.style-scope:has(span:has-text(/Watch again/i))
youtube.com##ytd-horizontal-card-list-renderer.ytd-item-section-renderer.style-scope:has(span:has-text(/Searches related to/i))
! YT - Remove more unwanted elements (Live chat, commments, etc...)
www.youtube.com###chat
!www.youtube.com###comments.style-scope.ytd-watch-flexy
www.youtube.com##ytd-download-button-renderer
www.youtube.com###flexible-item-buttons [aria-label="Promote"]
||youtube.com/complete/search
!STUZBOT WANS
! block fuck-annoying YouTube thumbnail autoplay
i.ytimg.com/an_webp
! dunno?
www.youtube.com##ytd-rich-section-renderer.ytd-rich-grid-renderer.style-scope > .ytd-rich-section-renderer.style-scope
! dunno?
www.youtube.com##ytd-reel-shelf-renderer.ytd-item-section-renderer.style-scope > .ytd-reel-shelf-renderer.style-scope
!annoying floating player
www.youtube.com##ytp-miniplayer-scrim
!END STUZBOT WANS
!END ALL YOUTUBE ONES TOGETHER
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment