I looked at the google-chrome-extension labs page and I don't see any example where you can use different content scripts for different sites. They have a page showing how to have multiple content scripts on one site, but 开发者_如何学JAVAnot the reverse. Is there any way to have different content scripts for different sites?
{
"name": "My extension",
...
"content_scripts": [
{
"matches": ["http://www.google.com/*"],
"js": ["script1.js"]
},{
"matches": ["http://www.yahoo.com/*"],
"js": ["script2.js"]
}
],
...
}
精彩评论