418 points · by ronjouch · 7y ago · 149 comments
I also use uBO for injecting my own styles on pages, like adding an absolute timestamp to github: https://news.ycombinator.com/item?id=15743008
Glad you find it useful!
Personal anecdote: While developing & maintaining a list it can be difficult to know if others are finding it useful because once it is being used (if it is done properly and doesn't break sites), there should be almost no feedback from the user base because they may just think the web is working as it should be and don't realize why it is how it is.
Also, to iOS passersby: here's an annoyances blocker for your Safari blocking pleasure: https://itunes.apple.com/us/app/unobstruct/id1255281426
In case you're worried that it'll catch incorrect elements via generic selectors or the like, the list is almost entirely site-specific selectors (see [1]). The (much smaller) list of generic selectors can be found at [2].
[1] https://github.com/yourduskquibbles/webannoyances/blob/maste...
[2] https://github.com/yourduskquibbles/webannoyances/blob/maste...
Not sure if this is what you mean exactly, but uBlock Origin (as well as a lot of other Firefox extensions) can be installed[1] on Firefox for Android.[2]
[1] https://addons.mozilla.org/en-US/android/addon/ublock-origin...
Adaway was great, but that required root of course
Chrome has never been an option for us with privacy in focus.
The guys behind uBO should get some price or something.
Unless you have some reason not to use it, it's much easier than changing about:config on each computer, you just copy over the user.js file.
Here's a hardened option (no affiliation): https://github.com/pyllyukko/user.js
And a relaxed version: https://github.com/pyllyukko/user.js/tree/relaxed
See here: https://github.com/gorhill/uBlock/wiki/Why-don't-you-accept-...
> I don't want the administrative workload coming with donations. I don't want the project to become in need of funding in any way: no dedicated home page + no forum = no cost = no need for funding. I want to be free to move onto something else if ever I get tired working on these projects (no donations = no expectations).
> Have a thought for the maintainers of the various lists. These lists are everything. This can't be emphasized enough.
[1] - https://github.com/gorhill/uBlock/wiki/Why-don't-you-accept-...
Many stuff is disabled by default, but it’s a moving target. There are some tutorials online to read.
It depends on what the browser is used for. Some hardening breaks certain sites.
Some stuff to look at:
- dns-prefetch - geo - cookie - dom (disable, breaks sites) - browser.cache.disk - clipboard.events - media.peerconnection - healthreport - spoofRefererHeader
Chrome doesn’t remove history when closed is a big issue.
https://gist.github.com/0XDE57/fbd302cef7693e62c769
I had some problems with sendRefererHeader, so it can definitely break some websites
Also, the DNS cache size explanation is a bit backwards. "Number of cached DNS entries. Lower number = More requests but less data stored." Where do you think that data is stored? Bigger cache size means fewer requests that inform a third-party (your DNS server) of which sites you're visiting. (Information leaks from the speed of resolving a query might be a concern, but I'm not sure how doable this is from a webpage.)
And then it disables all caches (including in-memory) for... what reason, exactly? You can configure firefox to clear all your browser data when you close it.
But then they force-enable WebGL, which enables quite a few tracking techniques. This list is weird.
I guess all I want to say is don't blindly apply settings from this list. The author traded a lot of convenience, speed, and security for some perceived privacy.
That makes sense. Checking the Referer header is a quick and dirty way to implement cross-site request forgery (CSRF) protection.
As expected it will increase any font that doesn't meet your minimum size.
If you're fine with per-site settings, just use the zoom option.
https://github.com/gorhill/uBlock/wiki/Dynamic-filtering:-de...
Just curious. I am on a similar boat but sometimes find some sites to be unreadable after having UBO and some other privacy adjustments through about:config.
Thanks!
Is there an example of a site that is unreadable after a default install of UBO for you? I'd be curious to check it out..
Never had this issue. Even in Slack, where UBO blocks 778 elements atm.
On the otherhand I also run NoScript temp-whitelist only so all sites that rely on javascript are broken by default for me until I figure out which CDN/etc to temp whitelist.
You can use ungoogled-chrome.
1. Hide Quora notification icon
2. Hide YouTube notification icon
3. Hide stackoverflow questions you might be interested section(right bottom section)
How do you use other than ad-blocker?
I'm beginning to realize that instead of using YouTube: explicitly search for video -> watch video -> read a comment or two -> close tab
YouTube has been using me: open main page -> get distracted by a video that an algorithm knows I'll be interested in -> click a couple more recommended videos -> fall down the auto-play ad revenue rabbit hole -> hour later: 'oh yeah, why did I open YouTube...?' -> perhaps search for intended video, perhaps get distracted again -> etc. etc
This trend has become synonymous with popular internet services over the past 10-20 years. These services are marketed as a way to connect with distant friends, view all the multimedia the internet has to offer, save us money, etc. when in reality the majority are leveraging large-scale data collection combined with neural nets to hijack our brains' reward systems just for the sake of greed. God bless uBlock!
The wikipedia page is completely broken on mobile devices during the fundraiser. (Text in the popup is so large that it becomes impossible to hit the close button).
I have donated to wikipedia for the past 5 years, and will continue to do so. But the fundraiser banner is just terrible, and persists after you donated.
Apple are basically neutering _all_ blockers, unfortunately. I don't know if they're planning on filling the void though.
Apple recommends all adblock extensions now use the content blocking API which is superior from a user privacy perspective. When using the content blocker apis, the extension cannot view or read which web pages are visited. Prior extension APIs had full access to browsing history (which obviously can be easily abused).
The content blocker API is different but does allow full featured and sophisticated adblockers. I know because I create one which is very efficient, effective and free - Magic Lasso Adblock (https://www.magiclasso.co/)
Meaning that if the blocker misses something (and it will), I have no way to deal with it.
This "privacy" canard is just Apple being Apple and punishing users in the name of full control. The #1 and #2 most used adblockers by everyone have no legitimate privacy concerns.
However, as of iOS 9, Apple has provided a new model for blocking ads: the content blocking API, which relies on lists of filters that the browser applies automatically. This is meant to replace an extension running JavaScript on your page to do the same thing, which means that blocking is faster and doesn't mean you have to trust the extension author to make sure they're not doing anything malicious.
This is extremely disappointing. There are "Apple-approved" blockers on the App Store but none is as efficient as uBlock Origin, they also lack transparency.
When compiling the content blocking rules, Safari also ensures the rules fit within reasonable execution limits to ensure there is absolutely no speed decrease due to blocking. If the rules are excessive, they are rejected by Safari.
In terms of effectiveness, yes there is variability between different blockers. We are the creators of one blocker for iOS and Mac and have found that it is extremely effective and in tests we've done provides a 2x speed-up on web page loading and rendering speed (for the top news and media sites we tested)
https://www.magiclasso.co/insights/difference-adblocking/It's not a content-blocker version, but it's a port of Chrome version.
[0]: https://github.com/el1t/uBlock-Safari/issues/122
[1]: https://github.com/el1t/uBlock-Safari/issues/130
[2]: https://developer.apple.com/documentation/safariextensions
So I heavily experimented with squeezing performance out of a JS-based trie-implementation for LZString[0]. Back then some early experimentation suggested that using TypedArrays was likely to be slower than using objects with numerical keys, and for non-degenerate input using a trie based on plain arrays and indexOf calls was the fastest[1]. However, it's been a while since I looked at those numbers (and I suspect that with uBlock's use case look-up performance matters more than insertion performance, which makes it very different from LZString's).
But it should be obvious that HNTrie's implementation[2] is something I'm very interested in ;).
[0] https://github.com/pieroxy/lz-string/pull/98
[1] https://github.com/pieroxy/lz-string/blob/ba8988028d78962eba...
[2] https://github.com/gorhill/uBlock/blob/2a91a685ce3d2dae5d3c2...
Incidentally, I did write a JS/WASM version of LZ4 block encoding[1] (also used in uBO). I do wonder if it could be of interest for the LZString project.
My understanding is that the output of LZ4 compression would need to be further processed to make it JS string-friendly (for localStorage purpose).
Maybe worth exploring if even with that extra step[2], the performance gain if any is worth it?
[1] https://github.com/gorhill/lz4-wasm
[2] Encode 7 bytes into 8 valid ASCII characters?
Anyone know why regex performance on Safari is so diabolically bad?
Safari 12.0.1 on OS X 10.13.6.
Test 100 needles against 16 dictionaries of hostnames
- Set-based x 3,149 ops/sec ±0.75% (59 runs sampled)
- Regex-based x 281 ops/sec ±0.78% (61 runs sampled)
- Trie-based (1st-gen) x 14,118 ops/sec ±1.66% (66 runs sampled)
- Trie-based JS (2nd-gen) x 12,349 ops/sec ±0.58% (61 runs sampled)
Chrome 70.0.3538.110 on OS X 10.13.6 64-bit.
Test 100 needles against 16 dictionaries of hostnames
- Set-based x 3,376 ops/sec ±1.95% (61 runs sampled)
- Regex-based x 4,492 ops/sec ±1.66% (27 runs sampled)
- Trie-based (1st-gen) x 9,431 ops/sec ±0.69% (51 runs sampled)
- Trie-based JS (2nd-gen) x 8,627 ops/sec ±0.63% (47 runs sampled)
- Trie-based WASM (2nd-gen) x 12,169 ops/sec ±0.58% (64 runs sampled)
Done.There is too much junk on sites, poorly designed elements that take up half my screen, social media elements, video elements - I tend to block those elements freely.
Sites that load but stay "blank" until you disable filtering
Adblock Warning Removal List
https://easylist-downloads.adblockplus.org/antiadblockfilter...
The one linked by fragebogen is the non-origin version which you probably do not want to use.
Benchmarking, the higher ops/sec the better.
Firefox 63.0 on Windows 10 64-bit.
Test 100 needles against 16 dictionaries of hostnames
- Set-based x 1,443 ops/sec ±3.46% (54 runs sampled)
- Regex-based x 4,093 ops/sec ±1.18% (25 runs sampled)
- Trie-based (1st-gen) x 8,993 ops/sec ±1.92% (59 runs sampled)
- Trie-based JS (2nd-gen) x 7,923 ops/sec ±2.81% (44 runs sampled)
- Trie-based WASM (2nd-gen) x 10,100 ops/sec ±1.75% (54 runs sampled)
Done. Benchmarking, the higher ops/sec the better.
Firefox 63.0 on Fedora 64-bit.
Test 100 needles against 16 dictionaries of hostnames
- Set-based x 1,707 ops/sec ±1.93% (60 runs sampled)
- Regex-based x 4,078 ops/sec ±0.88% (25 runs sampled)
- Trie-based (1st-gen) x 10,038 ops/sec ±1.41% (64 runs sampled)
- Trie-based JS (2nd-gen) x 7,258 ops/sec ±1.03% (40 runs sampled)
- Trie-based WASM (2nd-gen) x 8,033 ops/sec ±1.08% (44 runs sampled)
Done. Benchmarking, the higher ops/sec the better.
Safari 12.0.1 on OS X 10.14.1.
Test 100 needles against 16 dictionaries of hostnames
- Set-based x 3,801 ops/sec ±1.01% (62 runs sampled)
- Regex-based x 370 ops/sec ±0.68% (60 runs sampled)
- Trie-based (1st-gen) x 15,679 ops/sec ±0.73% (63 runs sampled)
- Trie-based JS (2nd-gen) x 16,408 ops/sec ±2.50% (62 runs sampled)
Benchmarking, the higher ops/sec the better.
Firefox 63.0 on OS X 10.14.
Test 100 needles against 16 dictionaries of hostnames
- Set-based x 1,703 ops/sec ±3.46% (57 runs sampled)
- Regex-based x 4,210 ops/sec ±1.95% (26 runs sampled)
- Trie-based (1st-gen) x 9,961 ops/sec ±0.74% (65 runs sampled)
- Trie-based JS (2nd-gen) x 7,120 ops/sec ±0.61% (40 runs sampled)
- Trie-based WASM (2nd-gen) x 7,993 ops/sec ±0.81% (44 runs sampled)
Benchmarking, the higher ops/sec the better.
Chrome 70.0.3538.110 on OS X 10.14.1 64-bit.
Test 100 needles against 16 dictionaries of hostnames
- Set-based x 3,414 ops/sec ±5.66% (53 runs sampled)
- Regex-based x 4,667 ops/sec ±2.50% (28 runs sampled)
- Trie-based (1st-gen) x 10,665 ops/sec ±1.31% (56 runs sampled)
- Trie-based JS (2nd-gen) x 7,852 ops/sec ±1.66% (43 runs sampled)
- Trie-based WASM (2nd-gen) x 11,930 ops/sec ±2.49% (58 runs sampled)
MacOS 10.14.1Hardware:
MacBook Pro (15-inch, 2017)
Processor: 2.9 GHz Intel Core i7
Memory: 16 GB 2133 MHz LPDDR3
Graphics: Radeon Pro 560 4096 MB
Intel HD Graphics 630 1536 MB
Benchmarking, the higher ops/sec the better.
Safari 11.1.2 on OS X 10.12.6.
Create dictionaries
-Set-based x 1,393 ops/sec ±0.85% (60 runs sampled)
-Regex-based x 1,798 ops/sec ±0.75% (61 runs sampled)
-Trie-based (1st-gen) x 419 ops/sec ±1.35% (61 runs sampled)
-Trie-based (2nd-gen) x 986 ops/sec ±0.77% (63 runs sampled)
Done.