3 ms·
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
by kroltan 3y ago
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-filters#subjecthas-textneedle 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.