问题描述
|
我正在尝试制作自己的firefox工具栏,但是覆盖问题。
因此,我已经设置好环境(可以在FF Extensions Manager中看到我的扩展程序),现在我正在尝试添加新的叠加层。
chrome.manifest
content sandBox chrome/content/
overlay chrome://browser/content/browser.xul chrome://sandBox/content/overlay.xul
overlay.xul
<?xml version=\"1.0\"?>
<overlay
xmlns=\"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul\">
<toolBox id=\"browser-toolBox\">
<toolbar id=\"findfile_toolbar\">
<label control=\"findfile_filename\" value=\"Search for files named:\"/>
<textBox id=\"findfile_filename\"/>
<label control=\"findfile_dir\" value=\"Directory:\"/>
<textBox id=\"findfile_dir\"/>
<button label=\"browse...\"/>
</toolbar>
</toolBox>
</overlay>
当我重新启动FF时,我看不到结果,问题出在哪里?
解决方法
我认为问题可能出在您的工具箱元素ID是\“浏览器工具箱\”,而不是导航器工具箱。在Firefox中,如果要将工具栏添加到UI,则需要使用\“ navigator-toolbox \”作为工具箱ID。
您可以在Born Geek工具栏教程中阅读有关工具栏开发的更多信息。