You can use uBlock Origin to block certain keywords in posts!

Why

If you’re like me, you’re really tired of seeing the lemmy homepage and every community fill up with really bad news from the US.

How

First, open the uBlock Origin dashboard, navigate to My Filters tab and add the appropriate line.

# lemmy.world
# thanks to /u/zkfcfbzr
lemmy.world##article.row:has-text(/Trump|Musk|ICE|Vance|slop|Microsoft|Grok|Republican|Democrat|Republicans|GOP|Democrats/i)

# lemmy.zip
lemmy.zip##article.row:has-text(/Trump|Musk|ICE|Vance|slop|Microsoft|Grok|Republican|Democrat|Republicans|GOP|Democrats/i)

Because the Lemmy HTML is generally the same on each instance, the above should work if you change the first part to the Lemmy domain. Then replace the | pipe separated keywords with your own list.

Here are some other things you can do:

# filter comments
# thanks to /u/Free_Opinions@feddit.uk
lemmy.world##article.comment-node:has(div.comment-content:has(p:has-text(/trump/i)))

# filter posts with certain words, with exceptions
# thanks to /u/zkfcfbzr@lemmy.world
lemmy.world##article.row:has-text(/word1|word2|word3/i):not(:has-text(/word4|word5|word6/i))

Originally posted a year ago.

  • Imhotep@lemmy.world
    link
    fedilink
    arrow-up
    7
    ·
    5 hours ago

    January 2025, I realize I don’t want to spend the whole year suffering king cunt’s awful rhetoric (it failed), I block his name with ublock. A few months later I forgot about it and spend an hour trying to figure out why I can’t find my Lemmy post mentioning Trump.

    It works really well.

  • reddig33@lemmy.world
    link
    fedilink
    English
    arrow-up
    40
    ·
    11 hours ago

    A lot of the Lemmy clients/apps have this feature built in as well.

    For example, in mlem.app on ios, you can build a list from Settings > Safety and Filters > Filters > Keywords (enable).

    • AmbitiousProcess (they/them)@piefed.social
      link
      fedilink
      English
      arrow-up
      9
      ·
      10 hours ago

      And on PieFed, you can either block things by keyword entirely, or just make them Semi-Transparent if you still want to see them in your feed occasionally, but just have it be easier to skip over.

      For example, here’s my filter for the words “Trump” and “Musk” turned on and off, where you can see the filter being on makes the post transparent enough that it’s kinda annoying to look at unless you really want to.

      KV3XBXJSYZEC3WV.png

      SCRq9s64vnqeHAe.png

      You can also set an expiry date if you only want the filter to work for a certain amount of time.

  • Snot Flickerman@lemmy.blahaj.zone
    link
    fedilink
    English
    arrow-up
    15
    arrow-down
    4
    ·
    11 hours ago

    I don’t understand why people have such trouble with this. I have curated my own feed of subscribed communities and I already only see stuff I want to see. Is this really that difficult? Don’t want US news? Don’t sub to US-centric news communities (whether in name or not). Don’t want furries? Don’t subscribe to furry communities? Don’t want anime? Don’t subscribe to anime communities. Don’t want politics? Don’t subscribe to political communities. Don’t want memes? Don’t subscribe to meme communities. I genuinely don’t understand why that’s not enough for people.

    • Perspectivist@feddit.uk
      link
      fedilink
      arrow-up
      3
      ·
      2 hours ago

      Just because I don’t want to see certain news doesn’t mean I want to block all news communities. The only way to achieve this is with keyword-based content filtering.

    • chicken@lemmy.dbzer0.com
      link
      fedilink
      arrow-up
      7
      ·
      6 hours ago

      Browsing Lemmy by only what you have subscribed to is not as viable as on Reddit because there is generally less content per community.

    • zen@lemmy.zipOP
      link
      fedilink
      English
      arrow-up
      23
      ·
      11 hours ago

      Oh I see the disconnect. I primarily browse Lemmy through the all page, because I wanted my subscribe community list to be a small selection of communities I really like. I also want to stay up to date on new communities when they appear.

    • JohnnyEnzyme@piefed.social
      link
      fedilink
      English
      arrow-up
      9
      arrow-down
      1
      ·
      11 hours ago

      The advantage with filtering keywords, Snot, is that you don’t have to waste any time at all curating communities.

    • onehundredsixtynine@sh.itjust.works
      link
      fedilink
      arrow-up
      6
      arrow-down
      1
      ·
      10 hours ago

      There are people who don’t have an account/don’t log in every time they visit Lemmy.

      Using RSS would be a better option for them than some extension’s filters, though.

    • AmbitiousProcess (they/them)@piefed.social
      link
      fedilink
      English
      arrow-up
      4
      arrow-down
      1
      ·
      10 hours ago

      This doesn’t always work, especially if you:

      • View by All/Trending/the equivalent depending on your client/instance
      • Follow broad communities (e.g. Shitposting where literally any topic is allowed, but you’d rather just not see more politics)
      • Follow communities that have rules against certain content that is sometimes just ignored, especially by new posters (e.g. there might be a “News” community that has a rule called “No U.S. Politics” but people in the U.S. will still post something related to American politics there because they simply didn’t read the rules first)
    • Bluegrass_Addict@lemmy.ca
      link
      fedilink
      arrow-up
      3
      arrow-down
      3
      ·
      10 hours ago

      I use all/new on Lemmy.

      I just block the things and the user that posted it from things I don’t want to see. furry stuff, racist shit, all sports related anything, most ai slop, and people that post the same thing in 30 different places.

      the feed gets nicer by the day but there’s always this random furry crap that always pops up. I swear it’s endless

  • Dagnet@lemmy.world
    link
    fedilink
    English
    arrow-up
    4
    ·
    10 hours ago

    Can I use something similar to remove videos with the “Members Only” tag on youtube?

    • zen@lemmy.zipOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      7 hours ago

      What clients exist for Firefox on a computer? Because I blocked Lemmy on my phone for a good reason (I was browsing it too often).

  • CubitOom@infosec.pub
    link
    fedilink
    English
    arrow-up
    9
    arrow-down
    22
    ·
    11 hours ago

    You should know, you can cover your ears, close your eyes and start to babble so you can protect yourself from bad news.

    • zen@lemmy.zipOP
      link
      fedilink
      English
      arrow-up
      21
      arrow-down
      3
      ·
      11 hours ago

      That’s unfair. I read The Guardian and the Australian Broadcasting Channel every day, and routinely check the Wikipedia Current Events page. I am up to date with the news. But I don’t come to Lemmy to get even more news about the fascist US, and their effects on the world.

      Being surrounded by it all day affects my headspace, and I’m aware of that. It’s not weakness that I protect myself.

      Now kindly fuck off.

    • it_depends_man@lemmy.world
      link
      fedilink
      arrow-up
      6
      ·
      9 hours ago

      It’s not “bad news”, it’s “negative noise”. Most of the time, reading about any singular instance or event does not actually inform people outside of the US.

      • CubitOom@infosec.pub
        link
        fedilink
        English
        arrow-up
        1
        arrow-down
        7
        ·
        9 hours ago

        This is a ridiculous take in my opinion.

        I guess if we are following the logic then we should also not study history as it generates a lot of negative noise.

        • Apepollo11@lemmy.world
          link
          fedilink
          arrow-up
          5
          ·
          8 hours ago

          It’s a ridiculous take that the political minutiae of the US is largely meaningless to people outside the US?

          Look, it’s enough for me to know that the USA has made a thinly veiled threat about forcibly taking over Greenland. This is of immediate concern to me.

          I don’t need to know the details of what the American version of Göring said in defence of the American version of the Gestapo this week.

          We have our own domestic nonsense that I’m sure you don’t get inundated with - why would it be so ridiculous for us not to want to get bombarded with yours?

          • CubitOom@infosec.pub
            link
            fedilink
            English
            arrow-up
            1
            arrow-down
            6
            ·
            8 hours ago

            Have fun with that opinion.

            I actually enjoy learning about what is happening around the world. No matter if it is a genocide, an obviously evil new law to strip away peoples freedoms, or new aide packages being sent to places that need it from countries a lot less wealthy than the USA.

            If anything, I hope the world learns from the fall of America. Although, mostly I’m excited about finally being able to use the metric system.