9951 explained code solutions for 126 technologies


chrome-extensionInject CSS into page


{
 "name": "My",
 // ...
 "content_scripts": [
   {
     "matches": ["*://*/*"],
     "css": ["my.css"],
   }
 ],
 // ...
}ctrl + c
"name": "My"

name of the extension for manifest.json

matches

on what pages should we inject css

"*://*/*"

inject css into all pages

my.css

name of the css file to inject (should be placed in the same folder as manifest.json file)