Thank you! Lemmy is basically unusable right now for those of us not from America. Every community from technology to gaming is wall to wall DAE TRUMP HITLER!? I get it, but some of us just want to talk about our hobbies. There are dedicated communities for discussing politics.
You Should Know
YSK - for all the 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 (interactive)
Rule 1- All posts must begin with YSK.
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 you improve your life.
Rule 2- Your post body text must include the reason "Why" YSK:
**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. **
Rule 3- Do not seek mental, medical and professional help here.
Do not seek mental, medical and professional help here. Breaking this rule will not get you or your post removed, but it will put you at risk, and possibly in danger.
Rule 4- No self promotion or upvote-farming of any kind.
That's it.
Rule 5- No baiting or sealioning or promoting an agenda.
Posts and comments which, instead of being of an innocuous nature, are specifically intended (based on reports and in the opinion of our crack moderation team) to bait users into ideological wars on charged political topics will be removed and the authors warned - or banned - depending on severity.
Rule 6- Regarding non-YSK posts.
Provided it is about the community itself, you may post non-YSK posts using the [META] tag on your post title.
Rule 7- You can't harass or disturb other members.
If you harass or discriminate against any individual member, you will be removed.
If you are a member, sympathizer or a resemblant of a movement that is known to largely hate, mock, discriminate against, and/or want to take lives of a group of people and you were provably vocal about your hate, then you will be banned on sight.
For further explanation, clarification and feedback about this rule, you may follow this link.
Rule 8- All comments should try to stay relevant to their parent content.
Rule 9- Reposts from other platforms are not allowed.
Let everyone have their own content.
Rule 10- The majority of bots aren't allowed to participate here.
Unless included in our Whitelist for Bots, your bot will not be allowed to participate in this community. To have your bot whitelisted, please contact the moderators for a short review.
Rule 11- Posts must actually be true: Disiniformation, trolling, and being misleading will not be tolerated. Repeated or egregious attempts will earn you a ban. This also applies to filing reports: If you continually file false reports YOU WILL BE BANNED! We can see who reports what, and shenanigans will not be tolerated.
Partnered Communities:
You can view our partnered communities list by following this link. To partner with our community and be included, you are free to message the moderators or comment on a 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!
American here. Suffering as well. Had to add filters to Voyager yesterday.
Feel free to kindly redirect people to
Thanks! Just added those to my block list!
How would one implement these filters but EXCLUDE certain things ... like say ... filter anything with "MAGA" but allow it if there's also mention of "Leopards" is still allowed? :)
lemmy.world##article.row:has-text(/word1|word2|word3/i):not(:has-text(/word4|word5|word6/i))
or
lemmy.world##article.row:has-text(/maga/i):not(:has-text(/leopard/i))
will do what you want - it'll block any posts which contain words from the first regex, unless it also has some words from the second regex
So, adding the not clause works but only if the leopard is within the title row I believe. I can go to the leopards ate my face and see posts, but those with the block words are still being filtered. Since you're now our IT support for UBO and Regex do you by chance know if it's possible to connect the title and community rows into a UBO filter for the :not part?
I'm not sure I follow - the filter seems to work as-is to me. It allows posts on both the front page and the [email protected] to bypass the filter for me.
To be clear, it's not only applying to the title row - the article
tag it targets contains the entire post as it appears in the post feed, including the title, community name, the person who submitted it, the timestamp, etc. So if anything there contains a filtered or whitelisted word it should trigger the filter.
I wouldn't have necessarily expected the whitelist filter to work directly on the leopards community page, since posts on community feeds don't include the community name, but it works anyways because, it seems, there's a hidden mod option in the HTML with the community name in it: <div class="modal-body text-center align-middle text-body">Are you sure you want to transfer [email protected] to [email protected]?</div>
I did not do extensive testing, but what I did was directly visit the leopards at my face community and could see there were articles being blocked within there. This filter leaves the separator lines of the posts that have been removed, and I was surprised to see articles blocked when viewing that community directly. Maybe I just messed up my regex, but I wanted to unblock anything with leopard/leopards in it even if it wasn't within that specific community just in case
infosec.pub##article.row:has-text(/Trump|Elon|Musk|nazi|TikTok/i):not(:has-text(/leopard(s)?|schadenfreude|find out/i))
Actually it seems to be a difference based on our instances - if I look at the community from infosec.pub then the bit of HTML I quoted above with the mod option isn't present, and there's no 'leopard', hidden or explicit, for the whitelist filter to find.
As a note, the (s)? on your leopard isn't needed - just 'leopard' will already match the 'leopard' part of 'leopards'
I don't know how to fix this currently, but I'll test out a bit more later to see if I can find anything that works well
I appreciate it... Obviously this is not critical :) and I appreciate your effort!
Hey! I'm pretty sure this one will work:
infosec.pub##:not(a.community-link:matches-attr(title=/.*?leopard.*?/i)) article.row:has-text(/Trump|Elon|Musk|nazi/i):not(:has-text(/leopard/i))
Where now we have three filters. If the community name matches the first regex, then nothing at all will be filtered out - and then the other two work the same as before. So any post that matches the blacklist regex will be filtered out unless it also matches the whitelist regex.
I chose to make the first regex /.*?leopard.*?/i
because my thinking is you may want to just copy/paste the other whitelist filter there for simplicity, but it might make more sense to do it like the others, like /leopardsatemyface|second community|third community|etc/i
. The "title" of a community for the purpose of this filter should be whatever appears after /c/ in the URL, not counting the @lemmy.world (or whatever instance) part.
Wow, nice work... I'll apply this and test it out and give feedback.
So, within the code snippet above, that line is not working with the .*?leopard.*?
but when I swapped in the community name leopardsatemyface
it seems to work as expected.
Within the community I see trump posts, and within the main feed I do not. I need to see if a trump post from that community bleeds through to my main feed. I'm watching for that.
What happened with .*?leopard.*?
? It was still filtering Trump posts even from the community page? My own testing showed that variant working - I never actually even tested the leopardsatemyface
variant
To be clear, this filter should allow for Trump posts that mention leopards or come from that community to show up on your main feed - that's what's desired here, right?
It also occurs to me that the ?
on the .*?
isn't necessary - even just .*leopard.*
should work as expected
It was not filtering trump from my main feed. Sorry I should have explained "not working" better in my reply :)
I think I may see why. I didn't actually bother to check the main feed before, but it seems like it does have the a.community-link tag the new filter targets in every post - so if a post from leopardsatemyface ever shows up in the main feed, then the filter will think it's on that community page and fail to block any posts. But the filter should work fine so long as no posts from that community are currently on the main feed. This should be the case regardless of which regex is used - if it wasn't just a coincidence earlier I'll have to test around to figure out what happened with that.
It's a process making a good filter, I guess - I may look into a more reliable and narrower way to achieve the desired effect later on
not all heroes wear capes!!!
Or, instead, you can just use Lemmy’s filters to filter out certain posts that contains certain words. No code necessary.
Edit: oops, I guess it’s just in the apps. Not lemmy itself.
¯\_(ツ)_/¯
Wait, how? I thought Lemmy default UI had no filter. Are you using Photon, Alexandrite or a mobile app?
Where? I see the option to block users, instances, and communities, but not words.
And regardless, I think this method has value because it can be applied to pretty much any website with a bit of tinkering, and it can be turned on and off with a couple of clicks. I actually started out with the ars filter before making one for Lemmy.
So, are you answering the questions from the comments on where lemmy has this setting hidden, because I am looking for it for over a year now and you got 7 upvotes and 3 people asking where this option is. Please let us know.
And it'll be faster and more efficient to do it server side as opposed to making uBlock Origin handle it.
I think it's better to use distributed filtering than having their SQL query do additional filtering. Every user who uses filtering adds to the lifting their side has to do - while your CPU probably sits under 1% utilization most of the time.
I'd rather Lemmy have filtering on the client-side, and just shoot us raw data.
Not all filtering is the same. Client side filtering requires more data to passed over the network that then just gets dropped. It also means rules that are not shared across devices.
Most importantly, these use CSS filters which are computationally more expensive because it has to take an entire DOM element, serialize it to text, string search it vs a server side filter that can just look at a one or two field variables. Even if it's not filtered in SQL on Lemmy's side I'd say it's still more efficient overall.
You do what you want, but adding extra work on the client side is not what I'd want for my users. Of course, if your Lemmy instance does not supporting filtering, then this is moot.
This works like a charm... Thanks!
It helps, and thanks for ublock idea for web browser users.
but because post titles aren't required to contain the keywords, I still see a lot of political crap.
Also, a shame you can't filter on image text.
Was literally updating my filtered words just now. I use Voyager app on iOS and it can be done in the settings.
Was literally updating my filtered words just now.
Not just figuratively updating them.
On Android, in Connect and Voyager you can block URLs too, hence getting rid of toxic / clickbaity sources beyond filtering for specific keywords
That's just great, thanks Connect and Voyager devs!
Voyager has a wonderful filter list under Settings -> Filters & Blocks. Works great and you can back up your settings to a json file in case you need to reload them.
ideally, this is a native feature in lemmy
I've been using similar, but slighly different ones that I assume do the same thing. You can also copy the filter and just replace the filter word rather than including them all in one. Naturally here the instance name must be also changed to that of yours.
lemmy.world##div.post-listing:has(span:has-text("/trump/i"))
And for filtering comments:
lemmy.world##article.comment-node:has(div.comment-content:has(p:has-text(/trump/i)))
At one point I had the very similar filter lemmy.world##.post-listing:has-text(/trump/i)
, but I wasn't happy with it because it would also remove post content on actual post pages, not just the post feed. That was the whole reason I swapped to the article.row solution instead - posts in the feed have the row class while posts on their own page don't. But it looks like you found an alternate solution to achieve essentially the same thing. Neat!
I have no real interest in filtering out comments, but it's nice to have that option there for people who do.
Eternity app can do that on Android
my title filters btw:
Orban,Trump,Vance,Elon,Musk,NATO,Scholz,Merz,Habeck,AOC,Thunberg,Tunberg,Greta,Mr. Beast,MrBeast,Bitcoin,Putin,Russia,Kremlin,AfD,Grünen,Gaza,Israel,Palestine,Democrat,Republican,Surpreme,Abortion,Taliban,China,Chinese,Harris,Biden,Genocide,Tory,Brexit,Google,Microsoft,Windows,Apple,iPhone,Android,OpenAI,ChatGPT,Lora,intel,nvidia,arch,mint,ubuntu,framework,raspberry,pihole,pipewire,linux,bezos,amazon,fairphone,Europeans,Brics,leyen,swift,immigrant,Santis,California,Youtube,Montag, Laberfaden,G'sudert wird,Bluesky,Twitter,Montagslaberfaden,blsky,bluesky,isglitch.com,Gaetz,Kulturfreitag,Jimmy Carter,Boebert,Pokemon
are there even any posts left?
yeah, mostly interesting cool stuff
Yoink
I would like to see less posts about Judd Trump.
Is there some kind of combination of words to filter out post bitching about having to see posts?
You can hide specific posts on Lemmy 0.19.4, unfortunately LW is still on 0.19.3