uBlock Filters for various stuff

There are likely various edge cases I’ve missed, and I am not too sure on performance compared to a purpose-built userscript, but these seem to work well enough for my use cases.

Throw these to My filters in uBO settings. May also work with AdGuard, but I can’t support you there as I don’t use it. Other ad blockers probably won’t work, but then why are you using an ad blocker that isn’t uBO anyway?

Remove the exclamation mark preceding the rules and adjust the placeholders accordingly. If you need multiple filters copy paste the appropriate lines.

You may need to replace the lemmy.* part if your home instance is on a different (sub)domain. I’m not using .lemmy-site and a global selector for performance reasons.


<span style="color:#323232;">! Post filters use :has instead of :upward to take advantage of native CSS support on browsers that implement it.
</span><span style="color:#323232;">! If :has is not implemented, uBO will emulate it via JS. :upward might be more efficient on those cases.
</span><span style="color:#323232;">
</span><span style="color:#323232;">! Lemmy: Filter post by link domain
</span><span style="color:#323232;">! lemmy.*##.post-listing:has(.fst-italic[href*="example.com"])
</span><span style="color:#323232;">
</span><span style="color:#323232;">! Lemmy: Filter post by keyword in title
</span><span style="color:#323232;">! lemmy.*##.post-listing:has(.post-title:has-text(/bkeywordb/i))
</span><span style="color:#323232;">
</span><span style="color:#323232;">! Lemmy: Filter post by author instance
</span><span style="color:#323232;">! lemmy.*##.post-listing:has(.person-listing[title$="@example.com"])
</span><span style="color:#323232;">
</span><span style="color:#323232;">! Lemmy: Filter post by community instance
</span><span style="color:#323232;">! lemmy.*##.post-listing:has(.community-link[title$="@example.com"])
</span><span style="color:#323232;">
</span><span style="color:#323232;">! Lemmy: Filter post by instance (author or community)
</span><span style="color:#323232;">! lemmy.*##.post-listing:has([title$="@example.com"]:is(.person-listing, .community-link))
</span><span style="color:#323232;">
</span><span style="color:#323232;">! Lemmy: Filter post by community name (any remote instance)
</span><span style="color:#323232;">! lemmy.*##.post-listing:has(.community-link[title^="!politics@"])
</span><span style="color:#323232;">
</span><span style="color:#323232;">! Lemmy: Filter post by community name (home instance, though in this case you can just use lemmy's own blocking)
</span><span style="color:#323232;">! lemmy.*##.post-listing:has(.community-link[title="!politics"])
</span><span style="color:#323232;">
</span><span style="color:#323232;">! Lemmy: Filter comment by keyword 
</span><span style="color:#323232;">! lemmy.*##.md-div:has-text(/bkeywordb/i):upward(.comment)
</span><span style="color:#323232;">
</span><span style="color:#323232;">! Lemmy: Filter comment by author instance
</span><span style="color:#323232;">! lemmy.*##.person-listing[title$="@example.com"]:upward(.comment)
</span><span style="color:#323232;">
</span><span style="color:#323232;">! Lemmy: Filter both by author instance
</span><span style="color:#323232;">! lemmy.*##.person-listing[title$="@example.com"]:upward(:is(.post-listing, .comment))
</span>
  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • wartaberita
  • uselessserver093
  • Food
  • aaaaaaacccccccce
  • [email protected]
  • test
  • CafeMeta
  • testmag
  • MUD
  • RhythmGameZone
  • RSS
  • dabs
  • TheResearchGuardian
  • Ask_kbincafe
  • KbinCafe
  • Testmaggi
  • Socialism
  • feritale
  • oklahoma
  • SuperSentai
  • KamenRider
  • All magazines