浏览器插件实现,新建一个文件夹,在该文件夹下新建两个文件,内容如下:
manifest.json- { "name": "测试", "version": "1.0", "permissions": [ "declarativeNetRequest" ], "declarative_net_request": { "rule_resources": [ { "id": "ruleset_1", "enabled": true, "path": "rules.json" } ] }, "manifest_version": 3}
复制代码
rules.json- [ { "id": 1, "priority": 1, "action": { "type": "block" }, "condition": { "urlFilter": "*0574web.net*js.js", "resourceTypes": [ "script" ] } }]
复制代码 |