Setting up content scripts for different sites in google-chrome

I looked at google-chrome-extension labs page and I see no example where you can use different content scripts for different sites. They have a page showing how to have multiple content scripts on the same site, but not vice versa. Is there a way to have different content scenarios for different sites?

+3
source share
1 answer
{
  "name": "My extension",
  ...
  "content_scripts": [
    {
      "matches": ["http://www.google.com/*"],
      "js": ["script1.js"]
    },{
      "matches": ["http://www.yahoo.com/*"],
      "js": ["script2.js"]
    }
  ],
  ...
}
+5
source

All Articles