问题描述
Error未经检查的runtime.lastError:未指定源代码或文件。简单的jQuery libriary.i认为CSP是正确的。也许有人面对它?
@H_502_3@ manifest.json:
"name": "name","description": "","version": "1.0","manifest_version": 2,"browser_action": {
"default_title": "title","default_icon": "icons/icon32.png","default_popup": "modules/pages/popup.html"
},"background":{
"scripts": [
"modules/js/background.js"
],"persistent": true
},"icons": {
"16": "icons/icon16.png","32": "icons/icon32.png","48": "icons/icon48.png","128": "icons/icon128.png"
},"web_accessible_resources": ["icons/icon128.png"],"permissions": [
"tabs","tts","storage","notifications","<all_urls>"
],"content_security_policy": "script-src 'self' https://code.jquery.com; object-src 'self';"
}
@H_502_3@ background.js
chrome.tabs.onUpdated.addListener(async (tabId,info,tab) => {
if (info.status == 'complete'){
chrome.tabs.executeScript(tabId,{ 'file' : 'https://code.jquery.com/jquery-3.5.1.min.js' })
}
})
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)