Feature Request: Whitelist All Elements On A Domain

Everything about using Adblock Plus on Mozilla Firefox, Thunderbird and SeaMonkey
Michael
Posts: 1361
Joined: Sat Dec 19, 2009 12:29 pm

Feature Request: Whitelist All Elements On A Domain

Post by Michael »

It has recently come to my attention that some websites have been using general element hiding filters in order to detect the presence of Adblock Plus and thus prevent access to pages. The problem is that there is no easy method of preventing such filters being active on a given domain without individually adjusting all of the rules to add ~example.com to the beginning of the them. Would it please be possible for an option to be added that would whitelist all elements from a given domain, for example, in the form @@||example.com^$element?
Wladimir Palant

Re: Feature Request: Whitelist All Elements On A Domain

Post by Wladimir Palant »

Won't they switch to using blocking rules just as easily?
Michael
Posts: 1361
Joined: Sat Dec 19, 2009 12:29 pm

Re: Feature Request: Whitelist All Elements On A Domain

Post by Michael »

The site in question loads adverts from third-party services. This means that it is safe to whitelist all scripts and images originating from the domain, which are used exclusively to detect the presence of Adblock Plus; this is something that can be done using the current options available. The problem is that no such option exists for elements, which means that their activity can be monitored and therefore used to determine whether or not the user has installed the add-on. It is simply not feasible to add ~example.com to the beginning of all of the general filters.

Another use of this option would be in supplementary subscriptions to deal with problems caused by general filters that are a part of another list.

I will send a link to the topic where the issue is being discussed via PM.
User avatar
Hubird
Posts: 2850
Joined: Thu Oct 26, 2006 2:59 pm
Location: Australia
Contact:

Re: Feature Request: Whitelist All Elements On A Domain

Post by Hubird »

I have not given this a lot of thought but it seems like it may be a good idea to me. It is very easy for them to wrap the entire page contents in a generic "honey pot" div.
Wladimir Palant

Re: Feature Request: Whitelist All Elements On A Domain

Post by Wladimir Palant »

Ok, makes sense then. Meaning that we should split up site whitelisting into disabling blocking rules and disabling element hiding rules. @@site$blocking would disable blocking rules. @@site$element would disable only element hiding rules. @@site$document would be equivalent to @@site$blocking,element.
Wladimir Palant

Re: Feature Request: Whitelist All Elements On A Domain

Post by Wladimir Palant »

Fixed: https://hg.adblockplus.org/adblockplus/rev/9d2c7ba5c0b3

Note that at this stage using $elemhide or $blocking options is discouraged, this is for "extreme" cases only. Reason is that the user interface won't give people any useful info - Adblock Plus isn't disabled on the site but certain types of filters don't work. Figuring out which filter is responsible is non-trivial as well.
Michael
Posts: 1361
Joined: Sat Dec 19, 2009 12:29 pm

Re: Feature Request: Whitelist All Elements On A Domain

Post by Michael »

Would it please be possible for the whitelist to appear in the list of blockable items? I believe that that is the standard behaviour of filters with the document option.
Wladimir Palant

Re: Feature Request: Whitelist All Elements On A Domain

Post by Wladimir Palant »

Not for Adblock Plus 1.2, sorry. For one, this requires string changes and the final strings are already being translated. What's more important, this will require some significant changes to the list of blockable items - what is currently showing up there is only a dummy message, meant to be visible only when no other entries are in the list. I'll put that on the list for 1.2.1 however.
Michael
Posts: 1361
Joined: Sat Dec 19, 2009 12:29 pm

Re: Feature Request: Whitelist All Elements On A Domain

Post by Michael »

After a bit of testing I've realised that the option doesn't appear to achieve the expected result on the problematic page. The whitelisting of elements not only covers the page that is loaded, but also covers all frames, including third-party ones. The adverts are blocked by the filter pagead2.googlesyndication.com##html, which is located in a third-party frame, while the detection elements are a part of the page. Would it please be possible for some additional option or alteration to only the whitelist the elements originating from the domain itself?
Wladimir Palant

Re: Feature Request: Whitelist All Elements On A Domain

Post by Wladimir Palant »

Heh... I'll sleep over that, right now this sounds like a dead end.
Wladimir Palant

Re: Feature Request: Whitelist All Elements On A Domain

Post by Wladimir Palant »

Second attempt: I backed out the original patch (https://hg.adblockplus.org/adblockplus/rev/e5668eb8adb9) and implemented a new approach (https://hg.adblockplus.org/adblockplus/rev/4effb515e845). Now exception rules can specify $elemhide option that will disable element hiding on matching pages - and only on these pages, no subframes or such. The exception rule will also appears in the list of blockable items (type "hidden" but green).
Michael
Posts: 1361
Joined: Sat Dec 19, 2009 12:29 pm

Re: Feature Request: Whitelist All Elements On A Domain

Post by Michael »

I'm glad to say that the new syntax works on the problematic site. I think that the only other issue is the export function of Adblock Plus, which would need to be updated to recognise this option as only suitable for releases 1.2 or later.
Wladimir Palant

Re: Feature Request: Whitelist All Elements On A Domain

Post by Wladimir Palant »

You are right. I have that on my release checklist but I can fix it now as well: https://hg.adblockplus.org/adblockplus/rev/b928eb5934ea

Noticed a bug btw, the $elemhide option was implied for filters without options, that shouldn't be: https://hg.adblockplus.org/adblockplus/rev/69c0d27c0075
Michael
Posts: 1361
Joined: Sat Dec 19, 2009 12:29 pm

Re: Feature Request: Whitelist All Elements On A Domain

Post by Michael »

Out of interest, is the release checklist available anywhere? It could help beta testers to locate and identify specific issues that you are aware of.
Wladimir Palant

Re: Feature Request: Whitelist All Elements On A Domain

Post by Wladimir Palant »

No, the release checklist a generic list that I go through for each release - just to make sure I don't forget anything. First point on the list is "Verify settings.js export routine considers new syntax features when setting version". Currently there are 23 points, four of them refer to K-Meleon however meaning that they aren't being done right now.
Post Reply