开发者

Setting up content scripts for different sites in google-chrome

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"]
    }
  ],
  ...
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜