Skip to content

Loading…

[help needed] Exceptions for 'default deny' (* * 3p block) #1101

Closed
bodisor opened this Issue · 3 comments

3 participants

@bodisor

I currently use third party frames and scripts default deny (* * 3p-frame block and * * 3p-script block) as dynamic filtering, and I wanted to switch to 3p default deny (* * 3p block).
But I cannot add exception rules for 'images' to specific domains..

There are loads of pages out there that display (useful) images from 'image hosting' domains (like imgur, imageshack, flickr etc) and I would like to add 3p image exception while under * * 3p block, and not exception rules for each image hoster used on a specific page (which might require 10-20 rules for a single domain).

I have tried:
example.com * image allow
example.com * image noop

..as per 'type-based rules' under 'rule syntax' wiki, which states: Another example: wired.com * image block, which means "block images from all origins when visiting a web page on wired.com"

I have also tried 3p-image allow and a few others, but they were discarded by uBlock as being invalid.
I should mention that these images are displayed under third party frames and scripts default deny.

@WalterWW

I think what you're trying to do is not possible like that. See #840

@gorhill

as per 'type-based rules' under 'rule syntax' wiki, which states

That's for rule syntax, but there is another wiki page for rule precedence, which is what is of interest here:

Dynamic filtering: precedence.

The party-specific cells override the type-specific cells.

Locally allowing (or nooping) images when globally blocking 3rd-parties certainly seem to make a lot of sense. However, this could lead to scenarios like the following, which is something I do not want, as this would cripple dynamic filtering:

* * 3p-script block
* taboola.com * block
example.com * 3p-script noop

So the intention here is to block 3rd-party scripts and taboola.com everywhere by default. But now if I wanted to allow 3rd-party scripts for a site, to un-break it, I would end up also allowing scripts from taboola.com, which is something I do not want.

It's why parties have higher specificity than types, i.e. 3rd-party override image.

If you want more granularity than what uBlock currently offers, there is Policeman for Firefox, or uMatrix for Chromium, they can take care of that case very easily.

@gorhill gorhill closed this
@bodisor

I thought it might not be possible.
I'll stick with third-party frames and scripts for now...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.