简体   繁体   English

Chrome 扩展图标清单

[英]Chrome Extension Icon Manifest

How to change Chrome Extension icon in this page?如何更改此页面中的 Chrome 扩展程序图标?

扩展说明

Here's my manifest code :这是我的清单代码:

{
  "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"
  ]
}

The icon on toolbar is changed, but not on the chrome://extension page.工具栏上的图标已更改,但在chrome://extension页面上未更改。

Set "icons" key in manifest.json .manifest.json设置"icons"键。

The browser_action.icons key is what gets displayed in the toolbar (and will probably only use 16, 24, and 32 sized images, see browserAction ). browser_action.icons键是显示在工具栏中的内容(并且可能只使用16、24和 32 大小的图像,请参阅browserAction )。

The one displayed in chrome://extensions is a top level icons key. chrome://extensions显示的是顶级icons键。 In the manifest documentation , look for the 6th entry, so that your manifest has an top-level entry, like:清单文档中,查找第 6 个条目,以便您的清单具有顶级条目,例如:

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

It should be:应该是:

{
  "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"]
}  

See: Chrome Extension Manifest Docs请参阅: Chrome 扩展清单文档

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM