开发者

Setting up content scripts for different sites in google-chrome

开发者 https://www.devze.com 2023-03-11 05:17 出处:网络
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 sc

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

精彩评论

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