我已使用“Microsoft Edge 扩展工具包”(https://www.microsoft.com/en-us/store/p/microsoft-edge-extension-toolkit/9nblggh4txvb)将 chrome 扩展代码转换为与 MS 兼容边缘浏览器。
从“about:flags”启用“开发者设置”并加载新转换的代码。
除了工具栏中的图标外,一切正常。它是一个“browserAction”(https://developer.microsoft.com/en-us/microsoft-edge/platform/documentation/extensions/api-support/supported-APIs/)按钮。
即使在尝试了很多图标但没有运气之后,它仍然显示浏览器的默认图标。
有没有人对可以设置图标或所需图像类型的任何选项有任何想法。
尝试安装其他扩展,它们的图标清晰可见。
有任何想法吗?
编辑:
这里是manifest.json文件内容: 转换后内容不变。
{
"manifest_version": 2,
"name": "............",
"description": "............",
"version": "1.0",
"author": "............",
"browser_action": {
"default_icon": {
"16": "data/images/icon-16.png",
"32": "data/images/icon-32.png",
"48": "data/images/icon-48.png",
"64": "data/images/icon-64.png",
"128": "data/images/icon-128.png"
},
"default_title": "............"
},
"icons": {
"16": "data/images/icon-16.png",
"32": "data/images/icon-32.png",
"48": "data/images/icon-48.png",
"64": "data/images/icon-64.png",
"128": "data/images/icon-128.png"
},
"background": {
"scripts":[
"background.js"
],
"persistent": false
},
"content_scripts": [
{
"run_at": "document_end",
"matches": ["http://*/*", "https://*/*"],
"css": [
"data/css/style.css"
],
"js": [
"data/js/script.js"
]
}
],
"permissions": [
"tabs",
"activeTab",
"contextMenus",
"http://*/*",
"https://*/*"
],
"web_accessible_resources": [
"data/images/icon-16.png",
"data/images/icon-32.png",
"data/images/icon-48.png",
"data/images/icon-64.png",
"data/images/icon-128.png"
]
}
为了添加更多内容,图标被适当地缩放到文件中提到的大小。