我正在编写一个简单的 Firefox 扩展,它在工具栏中有一个图标。我无法使用 XUL 添加工具栏图标。我正在使用的文件结构和代码如下:
延期:
-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");
}
请帮助我找出问题所在。