A chrome extension can inject script into the page, this is called content script.
https://developer.chrome.com/extensions/getstarted
https://developer.chrome.com/extensions/content_scripts
https://developer.chrome.com/extensions/messaging
图标变灰的问题
Add browseraction.defaulticon in your manifest.json file
{
...
"browser_action": {
"default_icon": "icons/icon-32.png";
},
...
}