filter - Adblock Plus - whitelisting rule -
i have element looks on page:
<a data-mytype="myvalue" href="http://example.com/promo/page">...</a>
this element gets hidden following abp rule (present in 1 of filter subscriptions use):
##[href*="/promo"]
how write whitelisting rule exclude element being hidden adblock plus based on specific attribute/value pair - data-mytype="myvalue"
one?
i have checked writing adblock plus filters , adblock plus filters explained pages, have not figured out how (successfully) write filter based on specified attribute.
both pages mention standard css selectors should work, not seem work:
@@a[data-mytype="myvalue"]
i have tried following:
#@#[href*="/promo"][data-mytype="myvalue"]
what missing?
note: not want rule cancel out ##[href*="/promo"]
, looking rule whitelist elements based on specific attribute/value pair.
edit (2016-03-17): clarified question little bit , put small test page.
you first disable existing rule:
#@#[href*="/promo"]
note selector has identical, otherwise element hiding exceptions won't apply. can add own rule, 1 consider data-mytype
attribute:
##[href*="/promo"]:not([data-mytype="myvalue"])
the combination of these 2 rules should have effect want. reference: :not() css pseudo-class
Comments
Post a Comment