我正在嘗試爲Firefox編寫一個插件。爲此,我使用Mozilla的「Addon-SDK」。Firefox插件 - 圖標不顯示
當我使用「jpm run」功能時,一切正常。但只要我將它打包到xpi並安裝它,圖標就不會顯示在工具欄中。這似乎是SDK中的一個錯誤。
我已經嘗試了其他博客文章的各種解決方法。
- 編輯的package.json
- 重命名爲 「圖標」
- 移動到數據
- 移動圖標根
- 絕對路徑
- 編輯在RDF
- 調試運行Firefox的版本Index.js ...
這裏最有用:
Firefox add-on : extension icon not showing
https://github.com/mozilla-jetpack/jpm/issues/197
由於Firefox的插件43必須verifyed。我做到了。我也在about:config中禁用了該功能,所以我可以更快地嘗試新版本。仍然沒有運氣。
這是我在index.js代碼:根據答案,但仍然沒有工作
var button = buttons.ActionButton(
{
id: "MorastLink",
label: "In den Morast",
icon:
{
"16": "./images/icon16.png",
"32": "./images/icon32.png",
"64": "./images/icon64.png"
},
onClick: CopyToMorast
});
在這裏,我也試過,移動路徑,改變名稱,使用絕對路徑編輯...
這是我的package.json
{
"title": "Morast",
"name": "morastaddon",
"version": "0.1.4",
"description": "An Addon to insert a \"Add to Morast\" button on distributer sites.",
"main": "index.js",
"author": "Lisa Austen",
"icon": "ressource://@morastaddon/data/images/icon16.png",
"icon64": "ressource://@morastaddon/data/images/icon64.png",
"engines": {
"firefox": ">=38.0a1",
"fennec": ">=38.0a1" },
"license": "MIT",
"keywords": [
"jetpack"
]
}
https://github.com/LAusten/MorastAddon.git
[Firefox擴展,不顯示圖標](可能的重複http://stackoverflow.com/questions/32941591/firefox -extension-not-showing-icons) –
我試過了。它沒有工作 –