Page 1 of 1

Writing ABP filters: ~elemhide and ~document

Posted: Sat Nov 20, 2010 11:11 pm
by famlam
Hi,

Just wondering:
Your website tells me this (http://adblockplus.org/en/filters):
Inverse type options: specify the element types the filter should not be applied to. Possible inverse type options: ~script, ~image, ~background, ~stylesheet, ~object, ~xbl, ~ping, ~xmlhttprequest, ~object-subrequest, ~dtd, ~subdocument, ~document, ~elemhide, ~other
however, $document and $elemhide have no inverse, do they?

At least:
@@*$~document is treated as @@*
@@*$~elemhide is treated as not_existing

Re: Writing ABP filters: ~elemhide and ~document

Posted: Wed Nov 24, 2010 3:52 pm
by Wladimir Palant
@@*$~document will whitelist URLs but not entire documents - e.g. @@|http://www.google.com/$~document will whitelist everything loaded by Google search but won't disable Adblock Plus on that page (so that third-party requests might still be blocked).

As to $~elemhide - it is pretty useless because $elemhide option isn't implied by default, you have to specify it explicitly. But $image,elemhide,~elemhide is valid - even though it is equivalent to $image.