Writing ABP filters: ~elemhide and ~document

Discussion on adblockplus.org website and translations
Post Reply
famlam
Posts: 59
Joined: Sat Aug 07, 2010 2:06 pm

Writing ABP filters: ~elemhide and ~document

Post 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
Wladimir Palant

Re: Writing ABP filters: ~elemhide and ~document

Post 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.
Post Reply