问题
I Need A Page Action Or Browse Action with Files That Change An element In A Website
回答1:
take a look at this: http://code.google.com/chrome/extensions/content_scripts.html
You can add javascript scripts and css stylesheets to a page to change the content.
good luck!
an example to change the background of www.google.com: you create a .css file with:
body{
background-color:black;
}
when you made the .css file, add this to manifest.json:
"content_scripts": [
{
"matches": ["http://www.google.com/*"],
"css": ["[name].css"]
}
],
matches means it will be added to any website that begins with http://www.google.com/ because of the '*'.
来源:https://stackoverflow.com/questions/11666449/how-to-change-sites-contents-using-chrome-extension-example