Re:YouTube is testing a more aggressive approach against ad ...
by kroltan on Saturday July 01, 2023 @12:33PM
(#36551891)
Not really just regex, I called it that for brevity. uBlock Origin's cosmetic filters, in particular :has-text which does indeed support regex.
It's basically CSS selectors, but with some very powerful ones added in too.
Check the docs for details https://github.com/gorhill/uBlock/wiki/Procedural-cosmetic-f...
The particular filters I use include things like:
! Kills "You won't believe something useless! Some subtitle"
youtube.com##ytd-rich-item-renderer:has-text(/you won'?t .*!( .*)?/i)
! Kills "100 idiotic life hacks that are definite safety hazards!"
youtube.com##ytd-rich-item-renderer:has-text(/(\d+) (.+)s/i)
And a bunch more more specific to my interests and native language, but I hope you got the gist of it.Also look at the sibling comment about other distraction-removals like shorts and engagement callout taming.
Can you please share which ad blocker you use and how we might use regexes to do this? Sounds fascinating and I want to do that myself