how I can change default icon in chrome extension?

前端 未结 3 823
轮回少年
轮回少年 2020-12-29 05:20

Here I am working with chrome extension development.

my manifest.json page as show

{
\"name\": \"DemoExtension\",
  \"version\": \"1.0\",
  \"descri         


        
3条回答
  •  [愿得一人]
    2020-12-29 06:06

    If you want to change the browser action default icon, just change

    "browser_action": {
      "default_icon": "star-on.png", //<--this line: change "star-on.png" to the icon you want
      "popup": "shopcmp.htm"  
    },
    

    That line indicates the default icon on first load of the extension.
    To change the icon in code, call chrome.browserAction.setIcon(details).

    If you want to change the extension icon (the icons that shows during installation, in the Chrome Web Store, in the extension management page, and as a favicon), add an icons property to your manifest.json file.

提交回复
热议问题