While this feature is available on many third-party apps, it’s not on the browser. However, since you’re already using an ad blocker, you can use it to filter out content as well.

To filter out posts with certain keywords, go to your custom filters and add this code. For example, to hide all posts containing the word “Elon”:

lemmy.world##div.post-listing:has(span:has-text("/elon/i"))

If your instance is something other than lemmy.world, just replace it with the correct domain.

To filter out comments, use this:

lemmy.world##article.comment-node:has(div.comment-content:has(p:has-text(/asshole/i)))

To add more keywords, simply duplicate the code and replace the keyword with another.

  • undetermined@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    1 month ago

    Those filters support regex which let you distinguish between those. I use it to filter out “X” when it’s a “word” on its own.

    I like using regex101 for testing.

    • 001Guy001@lemm.ee
      link
      fedilink
      English
      arrow-up
      0
      ·
      1 month ago

      Does it work for you when the word is at the start or end of the title?

      I found that the previous/next post’s text interferes with that because it doesn’t recognize a line break between them (at least in my testing)