Hacker News new | ask | show | jobs
by shoffmeister 1189 days ago
uBlock Origin is what makes the Internet usable.

I am saddened that I do not know how to best express my gratitude towards gorhill, and the filter list maintainers, for their incredibly valuable, tireless work, so "Thank you, so, so much!" will have to do here.

It's only thanks to uBlock Origin, I believe, that my parents (of rather old age) are able to make positive use of the Internet. A world without uBlock Origin would see them drowning in an onslaught of noise, attacks, flashing attention-grabbing spam, none of which improves the quality of their lives.

So, thank you, thank very very much, gorhill, and the filter list maintainers!

3 comments

Donate to the filter list maintainers if they accept it.

https://github.com/gorhill/uBlock/wiki/Why-don%27t-you-accep...

uBo is great, but can sometimes break sites who ask you to 'disable your AD blocker to view this page'. That's rare though, but it does happen.
By default we defuse such anti-blocker. If it happens, it's just a matter of reporting it to filter list maintainers. The more people report issues, the better the default filter lists get.

Also, a common cause of such anti-blocker walls is the use of other content blockers beside uBO, as this often breaks uBO's own anti-blocker mechanisms -- we often resolve such issues by asking people to disable other content blockers.

My solution is to leave the site :) and then add the domain to an add-on I made for myself that hides any links to it, on any page, any where.

I was hoping uBO would eventually get a dedicated feature like that, I don't think it's possible with filters. I tried pretty hard. I think knowing anyone could decide to completely erase a domain from their entire internet experience, down to the link level, would motivate sites not to do stupid things like this.

> I don't think it's possible with filters

We constantly create filters for detection issues[1]. Filter list maintainers have a lot of experience on how to work around such issues, with solutions that are often not obvious to people that are less familiar with filtering capabilities and syntax. The only way to know for sure whether it can be addressed is by reporting it.

* * *

[1] https://github.com/uBlockOrigin/uAssets/issues?q=is%3Aissue+...

I would totally use that add-on if you were interested in maintaining it as a publically available add-on.

Does it just strip out the <a> tag?

It is in the official extension repository [1]. I had to put it there because of how difficult/impossible it is to run a local extensions. But it's definitely not designed for general use. I'll be glad to guide you if the tiny amount of help I've included isn't enough.

The source [2] is available too.

The actual idea of the extension is "Style stuff using regular expressions". So you specify a regex; what to search, attributes and/or text (text can cause a lot of undesired results so I don't use it much); and css styles to add to the elements containing matches. I only really use it to apply visibility: hidden to any element with an attribute matching one big regex that's basically just a bunch of domains regex |'d together. The example in the options UI is what I'm still using years later, I've just added more domains.

EDIT: I just realize the example has "searchText" set to true, you'll probably want to set that to false.

To give you some idea of how user unfriendly it is, configuration is JSON in a textarea and the regexs are defined in a string in that JSON, necessitating the use of many backslashes for escaping from both regex and strings. It's basically brainfuck :)

I originally started with just taking out tags but that idea was quickly shot down. Lots of links aren't <a> tags. Sometimes the domain being linked to is buried in some JS in a onX event attribute, or some data-* attr that the UI framework uses and a bunch of other oddities. So the code searches all attrs. It's not super efficient but I've never noticed it causing a slow down.

Another problem is, often, the original request doesn't even contain the links, they're loaded after. So it uses a MutationObserver and looks at the new elements for matches.

[1] https://addons.mozilla.org/en-US/firefox/addon/ssure/

[2] https://github.com/7w0/ssure/blob/master/content/content.js

> I do not know how to best express my gratitude towards gorhill

Them opening a Patreon and you patronizing them would work great. And ensure the continuity of the project.

Gorhill has clearly said he won't accept money for this project, Cf the project Readme : https://github.com/gorhill/uBlock

I wish I could repay in some way the happiness this extension is bringing me though