Disclaimer: I am just a random stranger on the internet who likes uBlock Origin, read a handy comment, and figured out how to press F12. I am by no means a webpage expert, and these changes may have unintended consequences

I wanted to bring more attention to @linuxFan@vlemmy.net’s comment on how to block entire instances (not just specific communities on those instances) from your “all communities” feed, as well as add my own method to block them from the “list of communities” page.

This only works if you are using a web browser that supports uBlock Origin (so unfortunately, will not work on any of the mobile apps).

Firstly, install uBlock Origin if you haven’t already. Then, click on the uBlock extension icon -> “Gears” (settings) icon -> My Filters. Per @linuxFan@vlemmy.net, add:

your.lemmy.instance.com##.post-listing:has-text(@theInstanceYouWantToBlock.com)

Then click “Apply Changes”

So if I were not interested in any of lemmynsfw.com’s content, I would add:

lemmy.world##.post-listing:has-text(@lemmynsfw.com)

@linuxFan@vlemmy.net’s ELI5 explanation:

lemmy.world## - only use this filter on this site

.post-listing - evaluate everything on the page with the class name post-listing

has-text(@lemmynsfw.com) - the text we want to filter. CASE SENSITIVE!

Similarly, if you want to filter entire instances out of the “list of communities” page, you would add:

your.lemmy.instance.com##tr:has-text(@theInstanceYouWantToBlock)

I believe the tr is table-responsive, which is the type of table displayed on the “list of communities” page. If there are other responsive tables on a different Lemmy page that I don’t know about, it may affect those. Also, if Lemmy’s website is updated, these filters may no longer work.

If someone knows of a better method of doing this, please chime in. But otherwise, enjoy!

Why YSK: some instances have many communities that are centered around topics people are not interested in, and instead of blocking all of those communities one by one, it is easier to just block the whole instance.

Edit: Note that this will remove posts if a blocked instance is listed ANYWHERE in the post body. I accidentally blocked my own post when I tested the lemmynsfw filter just now lol

Edit(s): Further clarification/typos

Create a post

YSK - for all things that can make your life easier!

The rules for posting and commenting, besides the rules defined here for lemmy.world, are as follows:

Rules

1-All posts must begin with YSK. If you’re a Mastodon user, then include YSK after @youshouldknow. This is a community to share tips and tricks that will help yourself improve on activities, skills and various other tasks in life.

YSKs are about self-improvement on how to do things.

2- In your post’s text body, you must include the reason “Why YSK:” It’s helpful for readability, and informs readers about the importance of the content.

3- Non-factual ideas or concepts based on conspiracy theories will be removed.

4-No self promotion or upvote-farming of any kind.

5-Any type of spamming will get you banned.

Partnered Communities:

Mental Health

No Stupid Questions

Mildly Infuriating

Tech Support

Now Lemmy Explain

Lemmy Review

Lemmy Be Wholesome

Jokes

Lemmy Shitpost

To partner with our community and be included here, you are free to message me or comment on our pinned post.

Community Moderation

For inquiry on becoming a moderator of this community, you may comment on the pinned post of the time, or simply shoot a message to the current moderators.

Credits

Our icon(masterpiece) was made by @clen15!

  • 1 user online
  • 5 users / day
  • 1 user / week
  • 1 user / month
  • 2 users / 6 months
  • 1 subscriber
  • 32 Posts
  • 0 Comments
  • Modlog