页面被 chrome 屏蔽

page blocked by chrome

我正在尝试创建一个 chrome 扩展,它将重定向到自定义 html 文件。该页面被浏览器阻止

manifest.json

{
    "manifest_version": 3,
    "name": "Hello World!",
    "version": "0.1.0",
    "content_scripts": [
        {
            "matches": ["<all_urls>"],
            "js": ["src/blocker.js"]
        }
    ],
    "permissions": ["storage", "activeTab", "tabs"],
    "action": {
        "default_popup": "src/html/popup.html"
    }
}

blocker.js

window.location.href = chrome.runtime.getURL("html/popup.html");

Page blocked Image

blocked.html 添加到 manifest.json 中的 web_accessible_resources 或改用 declarativeRequest API