In my content blocker, is there a way to prevent ad-blocking on a certain website? For example, if I want to block ads on all websites besides The Verge, is there a way to prevent the blocking rules I provided from affecting this page?
The above answer is unfortunately incorrect for two reasons, the url-filter attribute is required in the trigger and the if-domain attribute must be an array of domain(s), not a single value. After a lot of trial and error I have found a working solution to whitelist a website.
{
"trigger": {
"url-filter": ".*",
"if-domain": ["the verge.com"]
},
"action": {
"type": "ignore-previous-rules"
}
}
The only documentation I was able to find on what was causing various errors using the above answer was scouring the source code here: https://github.com/WebKit/webkit/tree/67985c34ffc405f69995e8a35f9c38618625c403/Source/WebCore/contentextensions