根據Chrome內容安全策略的變化,我已將所有腳本移動到單獨的文件中,並在html頁面(背景和彈出窗口)中引用它們以擴展我的Chrome擴展。但我仍然得到以下信息谷歌Chrome瀏覽器:拒絕執行內嵌腳本
Refused to execute inline script because it violates the following Content Security Policy
directive: "script-src 'self' chrome-extension-resource:".
這是我的背景頁
<html>
<head>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="background.js"></script>
</head>
<!--<body onload = "Load();">-->
<body>
</body>
</html>
你看有沒有內嵌的js但錯誤信息是,直到那裏。我的代碼有什麼問題,我該如何解決它?
注:我使用清單第2版和Chrome 21.0.1180.89版本
感謝
沒有在'background.js'中看到代碼,這裏沒有太多要調試。 –
感謝羅布。問題解決了。 Plz看到我的答案 –