Chrome 扩展图标清单

Chrome Extension Icon Manifest

如何更改此页面中的 Chrome 扩展程序图标?

这是我的清单代码:

{
  "manifest_version": 2,
  "name": "Demo",
  "description": "This is demo.",
  "version": "1.0",
  "browser_action": {
    "default_icon": "icon128.png",
    "icons": {
       "16": "icon16.png",
       "48": "icon48.png",
      "128": "icon128.png"
    },
    "default_popup": "popup.html"
  },
  "permissions": [
    "activeTab",
    "storage"
  ]
}

工具栏上的图标已更改,但 chrome://extension 页面上没有。

manifest.json中设置"icons"键。

browser_action.icons 键显示在工具栏中(并且可能只使用 16、24 和 32 大小的图像,请参阅 browserAction)。

chrome://extensions中显示的是顶级icons键。在 manifest documentation 中查找第 6 个条目,以便您的清单具有顶级条目,例如:

{
  "icons": {
    "16": "icon16.png",
    "48": "icon48.png",
    "128": "icon128.png"
  }
}

应该是:

{
  "manifest_version": 2,
  "name": "Demo",
  "description": "This is demo.",
  "version": "1.0",
  "icons": {
    "16": "icon16.png",
    "48": "icon48.png",
    "128": "icon128.png"
  },
  "browser_action": {
    "default_popup": "popup.html"
  },
  "permissions": ["activeTab", "storage"]
}  

参见:Chrome Extension Manifest Docs