options.html:1 Refused to load the script 'xxxx' because it violates the following Content Security Policy directive: "script-src 'self' blob: filesystem: chrome-extension-resource:".

/*********************************************************************************
 *  options.html:1 Refused to load the script 'xxxx' because it violates the following Content Security Policy directive: "script-src 'self' blob: filesystem: chrome-extension-resource:".
 * 说明:
 *     使用Chrome扩展功能的时候,加载js库导致的错误,不要使用网络加载就行了。
 *
 *                                              2018-4-2 深圳 宝安西乡 曾剑锋
 ********************************************************************************/

一、参考文档:
    1. How to fix chrome-extension inline JavaScript invocation error?
        https://stackoverflow.com/questions/38483837/please-provide-a-valid-cache-path
2. Only local script and and object resources are loaded
https://developer.chrome.com/extensions/contentSecurityPolicy#resourceLoading
二、解决方法: I believe a better way could be downloading the remote client.js and include it as a local script.

 

posted on 2018-04-02 14:34  zengjf  阅读(1220)  评论(0编辑  收藏  举报

导航