HJo
HJo

Reputation: 2230

iOS Safari Content Blocker "ignore-previous-rules" not working

The desired functionality is for my content blocker is to hide a div with class ._mqsb on every page on youtube, not including an url that contains youtube.com/results somewhere

The first rule works fine, hiding every ._mqsb on every page with domain youtube.com

The second rule is supposed to ignore that rule whenever the domain is youtube.com and the URL contains results somewhere. But it doesn't seem to ignore the previous code, when I'm on https://m.youtube.com/results?q=eric+andre&sm=1 or any other search query.

This is the code in my blockerList.json:

{
    "trigger": {
        "url-filter": ".*",
        "if-domain": ["*youtube.com"]
    },
    "action": {
        "type": "css-display-none",
        "selector": "._mqsb"
    }
},
{
    "trigger": {
        "url-filter": ".*results.*",
        "if-domain": ["*youtube.com"]
    },
    "action": {
        "type": "ignore-previous-rules"
    }
}

Upvotes: 5

Views: 607

Answers (0)

Related Questions