ikemonn's blog

技術ネタをちょこちょこと

Chrome-Extension

【Chrome-Extension】Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'self' chrome-extension-resource:".が出た時

インラインでJavaScriptを書かない manifest_version 2からインラインでJSを書くと下記のエラーが出るので、JSを外部読み込みにすれば解決する。 Refused to execute inline script because it violates the following Content Security Policy directive: "…