Refused to run the JavaScript URL because it violates the following Content Security Policy directive: "script-src 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-...'), or a nonce ('nonce-...') is required to enable inline execution.
一调用 chrome.storage.local 就报这个...配了 N 个,还是不行...求解决..
![]() |
1
orcusfox 2019-01-31 18:00:44 +08:00 via iPhone
js 和 html 文件分开
|
![]() |
2
justseemore OP @napsterwu js 有个单独的文件夹,难道要加载远程?
|
![]() |
3
orcusfox 2019-01-31 18:23:43 +08:00 via iPhone
1. html 里面不能有 js 代码
2. 要有的话,要改 manifest.json,参考别人 vuejs 开发扩展的配置 |
![]() |
4
justseemore OP @napsterwu 好的,我去看看,谢谢
|
5
IdontWanToBeBan 2019-02-18 09:38:28 +08:00
说个可能有安全隐患的办法= =
装个 CSP 禁用插件 |