简体   繁体   English

Chrome 扩展程序图标未全部显示

[英]Chrome extension icons not all showing

I followed the instructions for manifest icons provided by Google from their developer website.我按照 Google 从其开发者网站提供的清单图标说明进行操作。

Here's a snippet of my manifest file (the png images are squared and the correct size):这是我的清单文件的一个片段(png 图像是平方和正确的大小):

"icons": { 

    "16": "icon16.png",
    "32": "icon32.png",
    "48": "icon48.png",
    "128": "icon128.png"
  },

So I uploaded my app and then installed it, but for some reason my app logo is still not showing on the chrome://extensions page.所以我上传了我的应用程序然后安装了它,但由于某种原因我的应用程序徽标仍然没有显示在 chrome://extensions 页面上。

在此处输入图片说明

Also in the chrome webstore my logo is not filling the whole space of the puzzle piece as seen here:同样在 chrome 网上商店中,我的标志没有填满拼图的整个空间,如下所示:

在此处输入图片说明

Is there something else I need to do for it to show?我还需要做些什么才能让它显示出来吗?

I found my problem in the manifest file.我在清单文件中发现了我的问题。

Originally I had my "icons" object inside the "browser_action" object like this:最初我在“browser_action”对象中有我的“icons”对象,如下所示:

"browser_action": {
    "name": "Manipulate DOM",
    "icons": { 
        "16": "icon16.png",
        "32": "icon32.png",
        "48": "icon48.png",
        "128": "icon128.png"
    }, 
    "default_icon": "icon128.png",
    "default_popup":"popup.html"
},

Upon relocating the "icons" object out of the "browser_action" object, the icon showed up in the chrome://extensions page like it is suppose to.将“icons”对象从“browser_action”对象中重新定位后,该图标会像预期的那样显示在 chrome://extensions 页面中。

"icons": { 
    "16": "icon16.png",
    "32": "icon32.png",
    "48": "icon48.png",
    "128": "icon128.png"
},
"browser_action": {
    "name": "Manipulate DOM",
    "default_icon": "icon128.png",
    "default_popup":"popup.html"
},

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

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