I do not know how to inject CSS into a webpage through a Chrome extension. I am trying to inject this into a web page:
body {
background: #000 !important;
}
a {
color: #777 !important;
}
Here is my manifest.json:
{
"update_url":"http://clients2.google.com/service/update2/crx",
"name": "Test Extension",
"version": "1.0",
"description": "This is a test extension for Google Chrome.",
"icons": { "16": "icon16.png",
"48": "icon48.png",
"128": "icon128.png" },
"background_page": "background.html",
"browser_action": {
"default_icon": "icon19.png"
},
"content_scripts": [
{
"matches": ["http://test-website.com/*"],
"js": ["js/content-script.js"]
}
],
"permissions": [ "tabs", "http://test-website.com/*" ]
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…