zoukankan      html  css  js  c++  java
  • chrome extension 开发

    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:

  • 相关阅读:
    字符串与Unicode码的相互转换
    关于es6中的yield
    ajax请求中的6个全局事件
    用H5上传文件
    类型化数组
    git笔记-9-29
    js正则表达式验证身份证号和密码
    assertThat用法
    java产生随机数的几种方式
    jQuery之Deferred对象详解
  • 原文地址:https://www.cnblogs.com/eret9616/p/14615391.html
Copyright © 2011-2022 走看看