谁能给我解释一下。我正在尝试使用带有 Google 扩展的 content_script 将 CSS 文件注入网页,但我的 css 文件从未添加到网页中。有人可以告诉我我做错了什么并帮助我解决它吗?谢谢
显现:
{
"name": "Extension",
"version": "0",
"description": "",
"permissions": ["tabs", "http://*/*", "https://*/*", "file:///*/*"],
"content_scripts": [
{
"matches": [ "http://*/*", "https://*/*", "file:///*/*"],
"css": ["myStyles.css"],
"js": ["myScript.js"],
"all_frames": true
}
]
}
我的样式.css
#test {
margin: 0 10px;
background: #fff;
padding: 3px;
color: #000;
}