为什么我的(开发中的)Chrome扩展程序(在Chrome 76中)突然出现多个“检查视图”?据我所知,当我单击视图时(如下图所示),这些视图将打开特定的选项卡并显示控制台。但是,由于这些是内容脚本(而不是背景脚本)的视图,因此很混乱。现在正在运行后台脚本的不同实例吗?会导致性能问题吗?如何禁用它们?它们也会出现在打包的扩展程序中吗?
更新,其中附有manifest.json
的摘要以及带有多个扩展程序实例的任务管理器的屏幕截图-这是本周的全部内容。
{
"manifest_version": 2,
"name": "Tally",
"version": "0.2.9",
"icons": {
"48": "assets/img/icons/tally_icon_48x48.png"
},
"browser_action": {
"default_icon": {
"16": "assets/img/icons/tally_icon_16x16.png",
},
"default_title": "Tally",
"default_popup": "assets/pages/popup/popup.html"
},
"background": {
"scripts": [
// scripts
]
},
"content_scripts": [{
"matches": ["<all_urls>"],
"js": [
// scripts
],
"css": [
// scripts
],
"run_at": "document_end"
}],
"permissions": [
"*://*/*",
"activeTab",
"storage",
"management",
"https://www.google-analytics.com/"
],
"web_accessible_resources": [
"*.svg", "*.png",
"*.jpg", "*.JPG",
"*.gif", "*.GIF",
"/assets/*",
"/assets/sounds/*"
],
"content_security_policy": "script-src 'self' https://ssl.google-analytics.com; object-src 'self'"
}