A
A
Alexander Vasyuchenko2015-09-28 10:03:40
safari
Alexander Vasyuchenko, 2015-09-28 10:03:40

How to create a filter for Safari Content Blocking?

Good afternoon!
I am writing an xcode extension for ad blocking safari. Problem with compiling a filter that would apply to all subdomains:
*.example.com (site1.example.com, site2.example.com, forum.example.com, etc.)
except for this subdomain:
images.example.com
My JSON file example:

[
    {
        "action": {
            "type": "css-display-none",
            "selector": ".swiffy-container"
        },
        "trigger": {
            "url-filter": "https?://(?!images\\.example\\.com)",
            "if-domain": ["*example.com"]
        }
    }
]

But it doesn't work.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question