2009-07-13 67 views
0

我加入这个:Firefox扩展开发:将选项卡添加到首选项窗格?

<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。它不起作用,虽然它建议here。我有这个代码精彩成功,但:

<menupopup id="menu_ToolsPopup"> 
    <menuitem id="helloworld-hello2" label="frigger!" 
       oncommand="HelloWorld.onMenuItemCommand(event);"/> 
    </menupopup> 

这是一个版本的问题(例如,火狐3.X不会做)?我无法在browser.xul中找到字符串BrowserPreferences,这似乎是问题的一部分。我如何将标签添加到Firefox的偏好设置窗格中?

[很抱歉,如果这个问题很简单,但搜索在Firefox扩展的帮助,比如搜索这个词的帮助“是。”]

回答

1

我不认为你的代码是错误的,但它应该重叠preferences.xul不browser.xul - 我猜你的覆盖是注册browser.xul,这就是为什么你的菜单项正常工作。

检查节“注册的重叠”大约一半下来MDC文章Building an Extension

+0

优秀,我会做到这一点,并立即汇报......我的意思是明天,这是凌晨3点在这里:)感谢。 – 2009-07-14 01:08:53