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?
Asked
Active
Viewed 1,733 times
3 Answers
6
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

fbailey
- 303
- 5
- 17
3
this article tells the solution http://comments.gmane.org/gmane.os.opendarwin.webkit.user/3971
{
"action": {
"type": "ignore-previous-rules"
},
"trigger": {
"url-filter": ".*",
"if-domain": ["*apple.com"]
}
}

Sebastian Brosch
- 42,106
- 15
- 72
- 87

Michael Yang
- 1,403
- 2
- 18
- 27
-
Please don't add "thanks" or "this answer worked" as answers. Invest some time in the site and you will gain sufficient [privileges](http://stackoverflow.com/privileges/vote-up) to upvote answers you like, which is the Stack Overflow way of saying thank you. – Nathan Tuggy Dec 11 '15 at 04:40
1
I think you would do something like this.
"action": {
"type": “ignore-previous-rules”
},
"trigger": {
“if-domain”: “theverge.com”
}
Some good links to check out.

cr_wells
- 11
- 1