Closed gorhill closed 9 years ago
Just for the record, the fix is different than what I suggested in my twitter answer: I had forgotten to take into account precedence logic. Still trivial though.
Thanks, I will experiment it!
For Crowdin translators:
all
means any type of resources from anywhere.
@mcdado Just in case it's not clear how to achieve "blacklist mode", these are the steps:
all
cell
Nothing will be blocked, static filtering is completely bypassed: "green" means "allow unconditionally".
To "blacklist" a site:
all
cell
This will cause the current site to become subjected to static filtering (EasyList, EasyPrivacy etc, i.e. whatever filter lists is in effect).
Dynamic filtering disengaged for current site: "gray" means disengage dynamic filtering, but apply static filtering.
In the screenshots above, 3rd-party frames are blocked to remind this is a good habit in general, and to illustrate that narrower dynamic rules prevails over more generic ones.
Similarly as above, to use uBlock's dynamic filtering in default-deny mode, it's just a matter of globally blocking the all
cell, then to noop
specific cells as needed (typically local cells).
Reminder: noop
disengage dynamic filtering but keep static filtering engaged.
So, if I were to manually edit the "My rules" list, it would look something like this right?
* * * allow
* * 3p-frame block
facebook.com * * noop
speedtest.net * * noop
spotify.com * * noop
youtube.com * * noop
Right now I cannot test it because I didn't figure out how (or whether it is possible) to compile the development version, so I have to wait for 0.8.7.0. As the reporter on Twitter says, it still blocks all sites.
Ok, I will create a bleeding edge "use-at-your-own-risk" dev version.
Also, be aware of issue #689.
What I meant is that the guy on twitter that you linked to at the top of this issue said the same thing: as of 0.8.6, that type of configuration blocks all sites.
I just tested it like so:
* * * allow
* * 3p-frame block
* youtube.com * noop
gazzetta.it * * noop
youtube.com * * noop
Ads are blocked on the specified sites (gazzetta.it and youtube.com) while are not blocked on a site such as smashingmagazine.com
This very unscientific test shows that it works as expected, embed youtube videos work thanks to * youtube.com * noop
I removed the all
row in c9ef3068dfa9f63a25461416cbdeec7c9812b7b5.
It's just the UI counterpart I removed, * * * [allow|block|noop]
is still supported.
The thinking is that the all
row is very unlikely to be used by anyone: it makes little sense to block all, and for the blacklist mode, the rule * * * allow
can be added manually, and once this is done, clicking the local setting of the 3rd-party
row and the current site row will effectively engage static filtering for the current site.
The vertical space is precious and limited, so I decided to remove the all
row given that it's very unlikely anyone will use it.
@gorhill can we then get back the domains connected count back? :)
@Mikey1993 it is back.
@chrisaljoudi Oh, this is per page, not global stats? Sorry, I was a bit lazy downloading the dev version.
https://twitter.com/comex/status/562800585473544195:
The fix is very trivial, though I didn't go through thoroughly to see all the consequences, if any. But it worked as intended. Interesting use case, I didn't think about this being useful.
One could as well use:
To block everywhere by default, which may also be sought after by many advanced users, as default-deny is a common mode for those using RequestPolicy and such.