1329
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
this post was submitted on 30 Jul 2023
1329 points (98.7% liked)
Lemmy.World Announcements
29158 readers
100 users here now
This Community is intended for posts about the Lemmy.world server by the admins.
Follow us for server news ๐
Outages ๐ฅ
https://status.lemmy.world
For support with issues at Lemmy.world, go to the Lemmy.world Support community.
Support e-mail
Any support requests are best sent to info@lemmy.world e-mail.
Report contact
- DM https://lemmy.world/u/lwreport
- Email report@lemmy.world (PGP Supported)
Donations ๐
If you would like to make a donation to support the cost of running this platform, please do so at the following donation URLs.
If you can, please use / switch to Ko-Fi, it has the lowest fees for us
Join the team
founded 2 years ago
MODERATORS
Fair. It's not too hard, but most lemmy UIs make it a bit harder than it needs to be because they want to be a fancy JavaScript-ridden mess of html tags.
On old.lemmy.world it is supremely easy, you just use the element picker tool of uBlock to select all posts, add the 'magic' command
:contains(reddit)
to filter out the word you don't want (in this case reddit), and you've got your filter. This would result inold.lemmy.world##.post:contains(reddit)
.On lemmy.world it is trickier because it is the kind of HTML no sane person would write. Doing the above you end up with
lemmy.world##div.mt-2.post-listing:contains(reddit)
which is messy, and misses a line that is used to divide the posts. With some manual tuning you can first simplify the first part to##.post-listing:contains(reddit)
and then add:xpath(.|following::hr[1])
to get rid of the annoying line. This results in##.post-listing:contains(reddit):xpath(.|following::hr[1])
.Oh is it literally just css selectors, but with a slightly different syntax? Fuck me, I never looked into it and assumed it was nonsense.
The extra syntax is just to add some features that aren't in CSS. Not quite sure where this came from, I think it's from the Adblock Plus era, but Gorhill perfected it for uBlock origin, which makes it a very powerful tool.
It's not limited to just hiding the elements either, if you want you can simply restyle them (I've used this to redact sports results until I hovered over them).