Skip to content

Instantly share code, notes, and snippets.

@shello
Last active April 25, 2025 23:45
Show Gist options
  • Save shello/3ef9752c4c77b78b81f6eb63c93ddfc9 to your computer and use it in GitHub Desktop.
Save shello/3ef9752c4c77b78b81f6eb63c93ddfc9 to your computer and use it in GitHub Desktop.

Lean YouTube Filters for uBlock Origin

This set of filters helps to make YouTube become usable and less distracting if all you want is to watch videos and don't care about YouTube's own shit algorithmic discovery.

Why?

I don't use YouTube while logged in, and I only watch videos on YouTube when I find links somewhere else. For instance, I use my RSS Feed reader to subscribe to YouTube channels (yes, that's a thing). I've maintained this set of filters over a number of months/years to make my YouTube experience less annoying, and I figured other people might want to benefit from that breath of fresh air.

What's being filtered?

Check the commented filter list file for more info on what is being filtered. I tried to make it somewhat readable. Basically: homepage content, related videos, and elements that are only of use to users logged in (and thus push you into a login page if you accidentally click them).

Installation on uBlock Origin

Import the following URL into your Filter Lists:

https://gist.github.com/shello/3ef9752c4c77b78b81f6eb63c93ddfc9/raw/lean_youtube_filters.txt

And you're done.

Alternatively copy the filter rules into your own filters, picking what you want from it. You don't get the benefit from any updates I make to these rules, but then again you might not want some of them anyway.

License

See CC0 1.0 Universal.

[Adblock Plus 2.0]
! Version: 202504251816
! Title: Lean YouTube filters
! Last modified: 25 Apr 2025 17:16 UTC
! Expires: 14 days (update frequency)
! License: https://creativecommons.org/publicdomain/zero/1.0/
!
! This is a list of filters I maitain to make YouTube usable for me.
! It helps with making the site less distracting and annoying to interact
! with for users without who are logged out.
! Some of these filters might not be suitable for your needs.
! They work for me though. Take what you need.
! Hide the content of the homepage, it's all junk anyway.
youtube.com###primary:matches-path(/^/$/)
! Hide elements that only have value for logged-in users
! such as comment action bar (thumbs up/down + reply action)
! and the "subscribe" button
youtube.com##.ytd-comment-action-buttons-renderer
youtube.com###simple-box > .ytd-comments-header-renderer
youtube.com###subscribe-button
! Hide sidebar and anywhere else related videos are shown
youtube.com###secondary
youtube.com###related
youtube.com##.ytp-button.ytp-next-button
youtube.com##.ytp-show-tiles.videowall-endscreen
! Remove the video+title from the autonav endscreen; the countdown and buttons
! remain visible to allow the user to stop autonav.
youtube.com##.ytp-player-content .ytp-autonav-endscreen-link-container
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment