https://developer.chrome.com/docs/extensions/

https://developer.chrome.com/docs/extensions/mv3/architecture-overview/

 

今天学习了一下chromeextension开发,开发了一个插件,主要用来自动approve gitlab代码,发送消息并默默关闭tab 

 

manifestv2

关键概念:

manifest.json

browserAction (针对所有页面的)

pageAction (针对特定页面的)

区别:

https://stackoverflow.com/questions/44712495/what-are-the-differences-between-page-action-and-browser-action/44713058

https://developer.chrome.com/docs/extensions/reference/browserAction/

https://developer.chrome.com/docs/extensions/reference/pageAction/

 

contentScript(能和当前某个tab内容进行交互)

触发时机:https://stackoverflow.com/questions/43233115/chrome-content-scripts-arent-working-domcontentloaded-listener-does-not-execut

 

 

background

  background分为 background pages和event pages

区别:

https://chrome-apps-doc2.appspot.com/extensions/event_pages.html

https://chrome-apps-doc2.appspot.com/extensions/background_pages.html

https://developer.chrome.com/docs/extensions/mv2/background_pages/

 

devtools

https://developer.chrome.com/docs/extensions/mv3/devtools/

 

manifestv3

https://developer.chrome.com/docs/extensions/mv3/intro/mv3-overview/

v3比较新,但是自己实际写的时候有时候有些问题,比如chrome.notification调不了,目前还是比较新鲜

 

 

debugging:

bgscript:

chrome extension 开发

 

相关文章:

  • 2022-01-22
  • 2022-12-23
  • 2022-01-23
  • 2021-06-07
  • 2022-12-23
  • 2021-04-30
  • 2022-02-08
  • 2021-12-14
猜你喜欢
  • 2022-02-15
  • 2022-01-23
  • 2021-05-30
  • 2021-05-02
  • 2021-09-09
  • 2021-11-13
相关资源
相似解决方案