我正在添加这个:
<prefwindow id="BrowserPreferences">
<!-- Create a new pane (tab) -->
<prefpane id="whateverPrefs" label="yes!"
onpaneload="alert('hey')"
image="chrome://helloworld/content/images/man.png">
<!-- Intermediary between GUI and preferences system -->
<preferences>
<!-- see the next section for more information -->
</preferences>
<!-- GUI Elements... -->
</prefpane>
</prefwindow>
到我的overlay.xul。尽管在此处建议,但它无论如何都不起作用。不过,我确实在这段代码上取得了巨大的成功:
<menupopup id="menu_ToolsPopup">
<menuitem id="helloworld-hello2" label="frigger!"
oncommand="HelloWorld.onMenuItemCommand(event);"/>
</menupopup>
这是版本问题吗(例如,Firefox 3.x 不会这样做)?我无法在 browser.xul 中找到字符串 BrowserPreferences,这似乎是问题的一部分。如何在 Firefox 的首选项窗格中添加选项卡?
[对不起,如果这个问题真的很简单,但是在 Firefox Extensions 上搜索帮助就像在“is”这个词上搜索帮助一样。]