Is it possible to block communities by name? Or is there any workaround to do so?
Specifically I am not interested in .*Moe
posts. So whenever a “SomethingMoe” pops up in my feed, I block that community. However, unlike most other communities, they seem to have a never ending source of permutations of their names. This can get very tiring, as blocking them makes the general feed contain less, but never any of these posts.
I guess I could write a script, which blocks any community with the regex /.*[Mm]oe.*/gm
and run it periodically. But I am a lazy bugger and neither want to write the script nor run it semi-periodically.
@[email protected]
If you’re using a browser (either desktop or some fork of Firefox on mobile) to use Lemmy, you can use uBlock Origin to hide certain content. On the plus side, this would work even when logged off from Lemmy or (in my case) without having a Lemmy account.
In “my filters”, you can add rules such as:
/.*lemmy.*.*/##.post-listing:has(.community-link:has-text("/^ich_iel/"))
Explanation:
-
/.*lemmy.*.*/
is a regexp to match any domain containing the word “lemmy” (e.g. lemmy.cafe, lemmy.world).-
##
denotes a CSS rule.-
.post-listing:has(.community-link:has-text("/^ich_iel/"))
is a set of nested CSS rules:- it filters for every
.post-listing
element…- having any
.community-link
element…- whose text content, in turn, would match the given regexp.
In my case,
/^ich_iel/
, a text which starts by “ich_iel”, which is the name for a Lemmy community I’m not interested in, due to me not speaking German.You can use whatever regexp you need. You can also use multiple rules using this pattern to filter out multiple things. You can replace the
.community-link
with other CSS classes to filter out post titles, usernames, instances, anything goes.Also a good option to have these “blocks” synced over multiple accounts. I did not think of uBlock Origin at all. Thanks for the Suggestion!