开发者

Inserting html into the current tab through chrome extention?

开发者 https://www.devze.com 2023-04-09 22:22 出处:网络
I am trying to insert some extra code into the current tab page in chrome using an extension i.e add a submit button on top o开发者_StackOverflowf the page. Where does this go? and how would I initial

I am trying to insert some extra code into the current tab page in chrome using an extension i.e add a submit button on top o开发者_StackOverflowf the page. Where does this go? and how would I initialize every page like this?


If you put this in your manifest.json,

"content_scripts": [{
  "matches": ["<all_urls>"],
  "js": ["example.js"],
  "css": ["example.css"]
}]

then example.js and example.css will be injected into every page you visit. See http://code.google.com/chrome/extensions/content_scripts.html for more information.

0

精彩评论

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