Inconsistent Use of the document and elemhide Option

Various discussions related to Adblock Plus development
Post Reply
rdnz
Posts: 4
Joined: Thu Sep 13, 2018 10:29 pm

Inconsistent Use of the document and elemhide Option

Post by rdnz »

I guess the utter syntax inconsistency that

Code: Select all

@@||example.com^$document
does not unblock third-party requests to example.com on every visited page and disables Adblock Plus on every visited page but disables it on example.com only instead is to be explained by the limits of the domain option not supporting patterns or using other parts of the url like the path. Is that correct?

But can we at least be consistent about it? Some examples from the Whitelist for Acceptable Advertisements (https://easylist-downloads.adblockplus. ... nrules.txt
):

Code: Select all

@@||coinurl.com/get.php?id=$elemhide,domain=campfyre.org
What does that mean? Which pattern counts? Both? In that case, shall we not turn it into

Code: Select all

@@||coinurl.com/get.php?id=$elemhide
@@||campfyre.org^$elemhide
to make it clearer?

I have not tested it but I will assume that this is the correct interpretation of simultanious use of domain and an option like elemhide or document from now on.

Code: Select all

@@||renego.$elemhide,domain=renego.de|renego.at|renego.be|renego.ca|renego.ch|renego.cl|renego.co.in|renego.co.nz|[...]
@@||www.google.*$elemhide,~third-party,domain=www.google.ac|www.google.ad|www.google.ae|www.google.al|www.google.am|[...]
Is the domain option not totally unnecessary here?

And my personal favorite:

Code: Select all

@@||amazon-adsystem.com^$document,domain=reddit.com
Even if we do not care about consistency, it seems stupid not to make it

Code: Select all

@@$document,domain=reddit.com|amazon-adsystem.com
. But caring about consistency, I would again suggest to make it two rules,

Code: Select all

@@||reddit.com^$document
@@||amazon-adsystem.com^$document
.

Confusion reaches a new level in cases like

Code: Select all

@@||google.com/uds/$script,subdocument,document,domain=netzwelt.de
, where normal options like script and subdocument are mixed with exception-only options like document as "||google.com/uds/" functions as a filter for the visited page for one option but only for third-party content for other options. It should clearly, more intelligibly, be

Code: Select all

@@||netzwelt.de^$document,domain
@@||google.com/uds/$script,subdocument,domain=netzwelt.de
@@||google.com/uds/$document
.
Post Reply