我正在尝试创建一个 chrome 扩展。我的清单文件是
{
"name": "Alert-Beep",
"action": {},
"manifest_version": 3,
"version": "0.1",
"description": "Beeps if alert() is called",
"content_security_policy": "script-src 'self'; object-src 'self'",
"permissions": [
"activeTab",
"scripting"
],
"content_scripts": [
{
"matches": ["https://*.com/*"],
"js": ["alert-beep.js"],
"run_at": "document_start"
}
]
}
加载扩展失败并显示消息
Failed to load extension
File
~\alert-beep
Error
Invalid value for 'content_security_policy'.
Could not load manifest.
我究竟做错了什么?
另一个对我有帮助的例子:
清单 v3
"content_security_policy": {
"extension_pages": "script-src 'self'; object-src 'self'; script-src-elem 'self' 'unsafe-inline' https://music.yandex.ru/;"
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)