Post

Replies

Boosts

Views

Activity

declarativeNetRequest block rule not working
except blocking images on any website opened except wikipedia, like https://www.mozilla.org, all images show up on every website [ { "id": 1, "priority": 1, "action": { "type": "block" }, "condition": {"regexFilter": ".*", "resourceTypes": [ "image" ] } }, { "id": 2, "priority": 1, "action": { "type": "allow" }, "condition": {"regexFilter": "wikipedia", "resourceTypes": [ "image" ] } } ] I downloaded the sample app from https://developer.apple.com/documentation/safariservices/safari_web_extensions/adopting_declarative_content_blocking_in_safari_web_extensions signed all targets, cleaned build and run on mac. Enabled the extension in safari preferences and clicking the icon in the status bar displays this "Blocks images on most webpages." message, so the extension seems to be running in safari. the sea creator sample works fine and i wonder why this web content blocker just won't adding activeTab to manifest.json didn't make a change { ... "declarative_net_request": { "rule_resources": [ { "id": "ruleset_1", "enabled": true, "path": "ruleset_1.json" } ] }, "permissions": [ "declarativeNetRequest", "activeTab" ] }
0
0
973
Dec ’21
declarativeNetRequest block rule not working
except blocking images on any website opened except wikipedia, like https://www.mozilla.org, all images show up on every website [ { "id": 1, "priority": 1, "action": { "type": "block" }, "condition": {"regexFilter": ".*", "resourceTypes": [ "image" ] } }, { "id": 2, "priority": 1, "action": { "type": "allow" }, "condition": {"regexFilter": "wikipedia", "resourceTypes": [ "image" ] } } ] I downloaded the sample app from https://developer.apple.com/documentation/safariservices/safari_web_extensions/adopting_declarative_content_blocking_in_safari_web_extensions signed all targets, cleaned build and run on mac. Enabled the extension in safari preferences and clicking the icon in the status bar displays this "Blocks images on most webpages." message, so the extension seems to be running in safari. the sea creator sample works fine and i wonder why this web content blocker just won't adding activeTab to manifest.json didn't make a change { ... "declarative_net_request": { "rule_resources": [ { "id": "ruleset_1", "enabled": true, "path": "ruleset_1.json" } ] }, "permissions": [ "declarativeNetRequest", "activeTab" ] }
Replies
0
Boosts
0
Views
973
Activity
Dec ’21