我将尝试为我的Chrome扩展程序添加一个内容脚本,但由于某些原因,内容脚本无法执行。
内容脚本代码:
console.log("In content script");
文件名为content.js
我的清单文件:
{
"name": "Getting Started Example",
"description": "Build an Extension!",
"version": "1.0",
"manifest_version": 3,
"background": {
"service_worker": "background.js"
},
"permissions": [
"storage",
"activeTab",
"scripting",
"tabs"
],
"action": {
"default_popup": "popup.html"
},
"content_scripts": [
{
"all_frames": true,
"matches": [
"<all_urls>"
],
"js": [
"content.js"
]
}
],
"options_page": "options.html"
}