Show HN: Let's Block It – Custom uBlock Origin Filters Made Easy
261 points| xvello | 4 years ago |letsblock.it | reply
I used to have an ad-hoc script to render and publish a personal uBlock Origin filter list, added to all my browsers. The goal of this project is to enable more people to build such a list custom list to filter out low-quality content and nags. Chose from a list of community-maintained templates, set your options, add your custom rules, and get your personal filter list.
Code and content are licensed under the Apache 2.0 license and hosted on https://github.com/xvello/letsblockit. The project is still pretty young and needs more filter templates, and lots of frontend improvements (my last web project was in 2005, this is not my forte). Any feedback is welcome!
[+] [-] perihelions|4 years ago|reply
https://hn.algolia.com/?query=%23%23%20ublock&type=comment&d...
("## ublock")
[+] [-] adamhearn|4 years ago|reply
[+] [-] bambax|4 years ago|reply
Here's something that might help others. On Whatsapp groups some users can become obnoxious, and one can fall into the trap of responding to their trolling. Yet AFAIK it's impossible to hide contributions from a given user in a group; one can only leave the group.
When using WhatsApp in the browser, a uBlock filter can hide contributions from a given user like this:
This hides text messages (even successive ones where the username isn't displayed) but doesn't hide messages with only images or other media. For those it's more difficult as the username is in a span that has no consistent characteristics; the username has to be unique and complete in order to not trigger false positives.Or maybe there's a better way. Suggestions welcome.
[+] [-] xvello|4 years ago|reply
I would not accept this template in the project though, as I am not willing to endorse usage of Facebook/Meta's websites. This is listed in the project limitations in https://letsblock.it/help/contributing
[+] [-] lordnacho|4 years ago|reply
[+] [-] dsr_|4 years ago|reply
[+] [-] Melatonic|4 years ago|reply
[+] [-] aasasd|4 years ago|reply
[+] [-] gnud|4 years ago|reply
[+] [-] andrei_says_|4 years ago|reply
[+] [-] lfmunoz4|4 years ago|reply
[deleted]
[+] [-] jakub_g|4 years ago|reply
[+] [-] SquareWheel|4 years ago|reply
I see ESL users trip on this one a lot.
[+] [-] Melatonic|4 years ago|reply
This way smart devices and apps cannot hardcode an IP for encrypted DNS to get around your DNS settings.
Works great for Roku - no more ads anywhere!
[+] [-] greggman3|4 years ago|reply
[+] [-] moooo99|4 years ago|reply
It is absolutely annoying, but I think it’s a result of Twitter using react-native-web and not (primarily) an obfuscation tactic
[+] [-] caaqil|4 years ago|reply
[+] [-] xvello|4 years ago|reply
[+] [-] wanderingmind|4 years ago|reply
[+] [-] stevedzreams|4 years ago|reply
theguardian.com##.fc-item__byline:has-text(Zoe Williams):upward(.fc-slice__item)
[+] [-] jbirer|4 years ago|reply
[+] [-] contravariant|4 years ago|reply
And at this point my personal list of uBlock rules is tailored to satisfy some very specific personal needs which I'd feel a bit apprehensive about just sharing without some degree of anonymity. Heck there are rules that would allow you to identify my account on other social media.
Also if this is to get as popular as userscripts/styles are/were then some way of finding rules per webpage would be nice.
[+] [-] xvello|4 years ago|reply
As this is just a humble weekend project, I had to cut in scope in order to move forward. This is why the project has no back-office and relies on Github for content contribution. I made this choice because the uBlock, EasyPrivacy and AdGuard communities are using the same tool to maintain their lists. I am open to changing that flow later this year, but not in the immediate future.
I understand your privacy concerns, and invite you to read https://letsblock.it/help/privacy to show that I take it seriously. AFAIK, Github is pretty lenient on identity, and wouldn't blink if you opened a throwaway anonymous account to contribute. You can also keep custom rules in https://letsblock.it/filters/custom-rules without necessarily contributing them as templates.
[+] [-] happybuy|4 years ago|reply
Some suggested improvements would be to actually use domain names ('*.google.com') as the way to classify filters instead of just tags ('google'). This would make it possible to integrate with an ad blocker that automatically suggest filters to enable when you are browsing a specific website.
E.g. when you are browsing Google you could see the list of suggested filters you could enable for that site based upon the filters from letsblock.it
It would also probably be necessary to add some rating or scoring of the filters in the future to sort and flag those which are most helpful vs. those which are out of date or no longer work.
[+] [-] danShumway|4 years ago|reply
And I do really like the effort to make this kind of stuff more accessible, I think it's understated how important it is to have a nice a site with a tutorial saying "here's how you add a filter", and that there's a ton of value in making it easier for normal people to update that. I'm happy to see people helping to meet that need.
----
I'll look into possibly making a pull request when I have more time, but for whatever it's worth, here are my HN rules that hide my own karma from me without otherwise messing with any of the site's formatting. I've found that making my own karma invisible helps me avoid some of HN's more toxic qualities:
HN is pretty annoying to customize because the generated HTML is so bad, but the site is also really static, so filters almost never need to be updated. I've got a couple more janky ones that I use for blocklisting certain users or filtering articles, but they're not really reliable or consistent enough for me to share imo.Caveats: I haven't tested these on mobile because I tend to avoid HN on mobile anyway, but I probably should test them sometime to make sure they don't break anything there. Also, some of these rules won't completely hide the elements from screen readers. It won't break anything, it just won't get rid of every reference to your karma. Unfortunately because of how HN's HTML is set up, it's kind of tricky to do better, but maybe I can try to think of something later that works better.
[+] [-] xvello|4 years ago|reply
The first iteration of this project was a CLI that took a yaml file (simple map of filter name -> params) and rendered the filter list to stdout. I ran that binary in a netlify pipeline to publish my list for personal use. As the filter data is hosted alongside the sources, it would be pretty simple to add back that offline rendering capability, or run a self-hosted instance.
As you said, I moved away from the CLI and towards a website to make it more accessible for everyone. The UX is still not great (especially the manual refresh via the uBlock interface), but hopefully we can improve on this front with more visibility.
[+] [-] Daneel_|4 years ago|reply
[+] [-] xvello|4 years ago|reply
I was confused because the "People also ask" section is correctly hidden, and I had to google about this "People also search for" thing that pops up when you bounce back from a search result. Thanks for the pointer!
As I've seen the `eob_` id prefix on other contextual blocks, I think I'll go with a more selective filter: `google.*###rso div.g div[jscontroller]`. It hides every "smart" blocks inside organic search result entries. Deploying right now!
[+] [-] wanderer_|4 years ago|reply
I do understand that this is something completely different, and it solves a real problem. Great job! Welcome back to the game, xvello, 2005 was a long time ago...
I might pop into the repo later and see about contributing.
[+] [-] ceejayoz|4 years ago|reply
I'd prefer blogs do what Serious Eats did for a while; if you blocked ads, they showed a message in its place saying "we get it completely, but consider donating". I'll happily donate or hop on a Patreon for a site I keep coming back to if you make it possible.
I block ads as a security measure, regardless of how much I appreciate/trust a site.
[+] [-] keithnz|4 years ago|reply
[+] [-] halpert|4 years ago|reply
[+] [-] jaredlt|4 years ago|reply
[+] [-] xvello|4 years ago|reply
[+] [-] only4here|4 years ago|reply
[+] [-] xvello|4 years ago|reply
The tricky part about SearX is that it runs on several domains, while uBlock Origin cosmetic filters need to be scoped to a given domain name. We'd need to add a parameter to specify the instance(s) on which you want the filter to be generated. If you want to follow up on this, would you mind opening an issue at https://github.com/xvello/letsblockit/issues/new?template=up... to help me with the testing?
[+] [-] captn3m0|4 years ago|reply
[+] [-] xvello|4 years ago|reply
[+] [-] darepublic|4 years ago|reply
[+] [-] foxfluff|4 years ago|reply
No doubt companies who want to violate your privacy will lobby hard against this.
[+] [-] bspammer|4 years ago|reply
[1] https://kb.adguard.com/en/general/adguard-filter-policy#anno...
[2] https://github.com/AdguardTeam/AdguardFilters/tree/master/An...
[+] [-] irrational|4 years ago|reply
[+] [-] xvello|4 years ago|reply
I investigated this, but as more and more websites are non-functional until you chose a consent option, just hiding the modal with a cosmetic filter won't help. There are several browser extensions to achieve this, and I feel like this is a superior solution than my project.
[+] [-] jakub_g|4 years ago|reply
https://github.com/r4vi/block-the-eu-cookie-shit-list
[+] [-] jiriro|4 years ago|reply
[+] [-] dombili|4 years ago|reply
¹ https://github.com/el1t/uBlock-Safari/issues/158
² https://browser.kagi.com/
[+] [-] cuham_1754|4 years ago|reply
[+] [-] djanogo|4 years ago|reply
[+] [-] xvello|4 years ago|reply
- I would never sync the same Firefox profile on my personal and work laptops, with letsblock.it I can use the same custom list on different Firefox profiles
- Rules will eventually break when websites are updated / redesigned. When that happens, one contributor can PR the fix for everyone, and you'll get it in the next 24h (uBlock Origin's minimal filter list refresh rate)