1
我正在編寫一個簡單的Firefox擴展,它在工具欄中有一個圖標。我無法使用XUL添加工具欄圖標。工具欄圖標未顯示在Firefox擴展中
擴展:
-chrome.manifest
-install.rdf
-chrome
-content
-toolbarButton.js
-toolbarButton.xul
-locale
-skin
-toolbarButton.css
-icon.png
chrome.manifest用於:
content myext chrome/content/
skin myext classic/1.0 chrome/skin/
locale myext en-US chrome/locale/en-US/
overlay chrome://browser/content/browser.xul chrome://myext/content/toolbarButton.xul
style chrome://global/content/customizeToolbar.xul chrome://myext/skin/toolbarButton.css
style chrome://global/content/browser.xul chrome://myext/skin/toolbarButton.css
XUL代碼:
<toolbarpalette id="BrowserToolbarPalette">
<toolbarbutton id="toolbar-clipper-button"
label="Some label"
tooltiptext="Does something"
oncommand="showMessage(event)" >
</toolbarbutton>
</toolbarpalette>
CSS代碼:
低於我的文件結構,我使用的代碼給出#toolbar-clipper-button {
list-style-image: url("chrome://myext/skin/toolbar-icon.png");
}
請幫我解決問題。
請展開「我無法添加工具欄圖標」。代碼似乎是正確的。你是否抱怨該按鈕沒有出現在工具欄中?它不會默認添加到任何工具欄,但它應該顯示在[自定義選項板](http://support.mozilla.org/en-US/kb/how-do-i-customize-toolbars)中。 – 2012-04-18 05:59:44
謝謝,答案沒有幫助,但問題:),我失蹤 風格chrome://global/content/customizeToolbar.xul chrome://myext/skin/toolbarButton.css – 2013-07-21 02:36:35