gpt4 book ai didi

javascript - 为什么我得到 "Failed to load extension. Invalid value for ' content_security_policy'”?

转载 作者:行者123 更新时间:2023-12-05 00:26:33 31 4
gpt4 key购买 nike

我正在尝试创建一个 chrome 扩展。我的 list 文件是

{
"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.
我究竟做错了什么?

最佳答案

另一个帮助我的例子:
list v3

"content_security_policy": {
"extension_pages": "script-src 'self'; object-src 'self'; script-src-elem 'self' 'unsafe-inline' https://music.yandex.ru/;"
}

关于javascript - 为什么我得到 "Failed to load extension. Invalid value for ' content_security_policy'”?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67130826/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com