我试图发布到网上商店的铬扩展。在chrome的开发者区域,我得到了错误。我试着在预告中添加"activeTab“,但是没有什么改变。
这是我的舱单:
{
"name": "scan document",
"version": "1.0",
"manifest_version": 2,
"description": "scan document",
"browser_action": {
"default_icon": {
"16": "icon.png"
}
},
"content_scripts": [{
"matches": ["<all_urls>"],
"js": ["contentScript.js"],
"all_frames": true
}],
"background": {
"scripts": ["background.js"]
},
"permissions": [
"nativeMessaging"
],
"optional_permissions": [
"downloads.open",
"<all_urls>"
]
}这是一个错误:
Because of the following issue, your extension may require an in-depth review:
- Broad host permissions
Instead of requesting broad host permissions, consider using the activeTab permission, or specify the sites that your extension needs access to. Both options are more secure than allowing full access to an indeterminate number of sites, and they may help minimize review times.
The activeTab permission allows access to a tab in response to an explicit user gesture.
{
...
"permissions": ["activeTab"]
}
If your extension only needs to run on certain sites, simply specify those sites in the extension manifest:
{
...
"permissions": ["https://example.com/*"]
}我能做什么?
发布于 2018-10-31 14:31:37
我认为当您的扩展请求过于通用的权限时,会显示此错误。
在我当前编码的chrome扩展中,由于我的content_scripts的匹配,我出现了这个错误:
content_scripts": [
{
"matches": "https://*/*",
"js": ["my-script.js"]
}
]我用https://www.example.com/*代替https://www.example.com/*来修复它。但是这个脚本只会在这个网站上被调用。
你也有同样的错误。在您的示例中,由于optional_permissions all_url,也可能会显示此错误。
"optional_permissions": [
"< all_urls>"
]https://stackoverflow.com/questions/53029899
复制相似问题