# vs ## vs ###
# vs ## vs ###
As title, what are the differences?
As examples:
#a(href^=http://adserver.com/)
##[class*="GoogleAds"]
###AdCol
I believe ### is redundant. ##ADCol and ###AdCol is the same isn't it?
As examples:
#a(href^=http://adserver.com/)
##[class*="GoogleAds"]
###AdCol
I believe ### is redundant. ##ADCol and ###AdCol is the same isn't it?
Re: # vs ## vs ###
# -> simple hiding rule, ABP syntax, with () around attribute selectors
## -> regular css syntax
and # is the id selector in css, so the rule ##[id="AdCol"] can also be written as ###AdCol
## -> regular css syntax
and # is the id selector in css, so the rule ##[id="AdCol"] can also be written as ###AdCol
Re: # vs ## vs ###
So basically they are all the sameAres2 wrote:# -> simple hiding rule, ABP syntax, with () around attribute selectors
## -> regular css syntax
and # is the id selector in css, so the rule ##[id="AdCol"] can also be written as ###AdCol
#(id=AdCol)
#*(id=AdCol)
##[id="AdCol"]
##*[id="AdCol"]
###AdCol
##*#AdCol
Which syntax should I use? Which is more efficient or run faster?
Why do we create different syntax (#(id=), ##[id=""], ###id) if they do the same thing?
Use this one:
Or, if you want it a little more readable:
The "simplified" syntax #(id=AdCol) is only kept for backwards compatibility, next version of Element Hiding Helper won't create such filters any more. And handling of [id="AdCol"] in the browser is likely slower than #AdCol (I didn't measure that however).
Code: Select all
###AdCol
Code: Select all
##*#AdCol
Thanks.
This document is very outdated: http://adblockplus.org/en/filters . It is still teaching beginners how to use the old syntax.
Is there any updated document for the CSS-syntax filters?
This document is very outdated: http://adblockplus.org/en/filters . It is still teaching beginners how to use the old syntax.
Is there any updated document for the CSS-syntax filters?
The only thing is to say CSS selector starts with ##.Wladimir Palant wrote:http://adblockplus.org/en/filters#elemhide_css
Everything above is to tell people how to use the outdated ABP syntax. This is why I got confused initially. Some serious updates should be made.