[Suggestion] Conditionals
Posted: Mon Mar 14, 2016 3:49 am
I don't think it is possible currently, but is it possible to have conditions? As an example use, say you want to only show ads on YouTube channels you are subscribed to. This could be easily accomplished by checking if the document contains "data-is-subscribed="true"". If it doesn't, remove ads.
I'm not really familiar with the Adblock rule syntax, but I'm thinking this could be added right in the filter rule. In addition to doing the kind of "regex" pattern thing for the domain, conditions could be added as well. The usual ||, &&, and ! could be used. Something such as "youtube.com && $document.contains(data-is-subscribed="true")" would be sufficient to define an exception rule. Of course the syntax would have to be adjusted for backwards compatibility and stuff.
I'm not really familiar with the Adblock rule syntax, but I'm thinking this could be added right in the filter rule. In addition to doing the kind of "regex" pattern thing for the domain, conditions could be added as well. The usual ||, &&, and ! could be used. Something such as "youtube.com && $document.contains(data-is-subscribed="true")" would be sufficient to define an exception rule. Of course the syntax would have to be adjusted for backwards compatibility and stuff.