Get Google Chrome
Vimium · 在 Chrome 里使用 vim 快捷键
justseemore
V2EX  ›  Chrome

大佬们,问个 chrome 插件的问题..

  •  
  •   justseemore · Jan 31, 2019 · 2857 views
    This topic created in 2664 days ago, the information mentioned may be changed or developed.

    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 个,还是不行...求解决..

    5 replies    2019-02-18 09:38:28 +08:00
    orcusfox
        1
    orcusfox  
       Jan 31, 2019 via iPhone
    js 和 html 文件分开
    justseemore
        2
    justseemore  
    OP
       Jan 31, 2019
    @napsterwu js 有个单独的文件夹,难道要加载远程?
    orcusfox
        3
    orcusfox  
       Jan 31, 2019 via iPhone
    1. html 里面不能有 js 代码
    2. 要有的话,要改 manifest.json,参考别人 vuejs 开发扩展的配置
    justseemore
        4
    justseemore  
    OP
       Jan 31, 2019
    @napsterwu 好的,我去看看,谢谢
    IdontWanToBeBan
        5
    IdontWanToBeBan  
       Feb 18, 2019
    说个可能有安全隐患的办法= =
    装个 CSP 禁用插件
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5643 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 55ms · UTC 02:31 · PVG 10:31 · LAX 19:31 · JFK 22:31
    ♥ Do have faith in what you're doing.