2009-07-13 64 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