rem: #ifdef MOZ_THUNDERBIRD 
add: #ifndef MOZ_PHOENIX 
context: function Startup() {  gWindowState = window.location.search.substr("?type=".length, window.location.search.length);    var isExtensions = gWindowState == "extensions";  gURIPrefix  = isExtensions ? "urn:mozilla:extension:" : "urn:mozilla:theme:";  gDSRoot     = isExtensions ? "urn:mozilla:extension:root" : "urn:mozilla:theme:root";  gItemType   = isExtensions ? nsIUpdateItem.TYPE_EXTENSION : nsIUpdateItem.TYPE_THEME;    document.documentElement.setAttribute("windowtype", document.documentElement.getAttribute("windowtype") + "-" + gWindowState);  gExtensionsView = document.getElementById("extensionsView");  gExtensionsView.setAttribute("state", gWindowState);  gExtensionManager = Components.classes["@mozilla.org/extensions/manager;1"]                                .getService(Components.interfaces.nsIExtensionManager);    // Extension Command Updating is handled by a command controller.  gExtensionsView.controllers.appendController(gExtensionsViewController);  // This persists the last-selected extension  gExtensionsView.addEventListener("richview-select", onExtensionSelect, false);  // Finally, update the UI.   gExtensionsView.database.AddDataSource(gExtensionManager.datasource);  gExtensionsView.setAttribute("ref", gDSRoot);  gExtensionsView.focus();    var pref = Components.classes["@mozilla.org/preferences-service;1"]                       .getService(Components.interfaces.nsIPrefBranch);  if (!isExtensions) {    gExtensionsView.addEventListener("richview-select", onThemeSelect, false);    if (pref.prefHasUserValue(PREF_GENERAL_SKINS_SELECTEDSKIN))      gCurrentTheme = pref.getCharPref(PREF_GENERAL_SKINS_SELECTEDSKIN);    else      gCurrentTheme = KEY_DEFAULT_THEME;          var useThemeButton = document.getElementById("useThemeButton");    useThemeButton.hidden = false;    var optionsButton = document.getElementById("optionsButton");    optionsButton.hidden = true;        var pref = Components.classes["@mozilla.org/preferences-service;1"]                         .getService(Components.interfaces.nsIPrefBranch);    if (!pref.getBoolPref(PREF_EXTENSIONS_DSS_ENABLED) &&         pref.getBoolPref(PREF_EXTENSIONS_DSS_SWITCHPENDING)) {      var lastSelectedSkin = pref.getCharPref(PREF_EM_LAST_SELECTED_SKIN);      for (var i = 0; i < gExtensionsView.childNodes.length; ++i) {        var item = gExtensionsView.childNodes[i];        if (item.getAttribute("internalName") == lastSelectedSkin) {          setRestartMessage(item);          break;        }      }    }  }    // Restore the last-selected extension  var lastSelected = gExtensionsView.getAttribute("last-selected");  if (lastSelected != "")    lastSelected = document.getElementById(lastSelected);  if (!lastSelected)     gExtensionsView.selectionForward();  else    gExtensionsView.selected = lastSelected;  var extensionsStrings = document.getElementById("extensionsStrings");  document.title = extensionsStrings.getString(gWindowState + "Title");    gExtensionsViewController.onCommandUpdate();     gGetMoreURL = pref.getComplexValue(isExtensions ? PREF_EXTENSIONS_GETMOREEXTENSIONSURL                                                   : PREF_EXTENSIONS_GETMORETHEMESURL,                                      Components.interfaces.nsIPrefLocalizedString).data;  var app = Components.classes["@mozilla.org/xre/app-info;1"]                      .getService(Components.interfaces.nsIXULAppInfo);  gGetMoreURL = gGetMoreURL.replace(/%APPID%/g, app.ID);  // Update various pieces of state-dependant UI  var getMore = document.getElementById("getMore");  getMore.setAttribute("value", getMore.getAttribute(isExtensions ? "valueextensions" : "valuethemes"));  getMore.setAttribute("tooltiptext", getMore.getAttribute(isExtensions ? "tooltiptextextensions" : "tooltiptextthemes"));    if (!isExtensions) {    var themePreviewArea = document.getElementById("themePreviewArea");    themePreviewArea.hidden = false;    gExtensionsView.removeAttribute("flex");  }    // Set Initial Size  var win = document.documentElement;  if (!win.hasAttribute("width") || !win.hasAttribute("height")) {#ifdef MOZ_THUNDERBIRD    win.setAttribute("width", isExtensions ? 460 : 560);#else    win.setAttribute("width", isExtensions ? 400 : 500);#endif    win.setAttribute("height", isExtensions ? 300 : 380);  }  // Now look and see if we're being opened by XPInstall  gDownloadManager = new XPInstallDownloadManager();  var os = Components.classes["@mozilla.org/observer-service;1"]                     .getService(Components.interfaces.nsIObserverService);  os.addObserver(gDownloadManager, "xpinstall-download-started", false);  gObserverIndex = gExtensionManager.addDownloadObserver(gDownloadManager);    if ("arguments" in window) {    try {      var params = window.arguments[0].QueryInterface(Components.interfaces.nsIDialogParamBlock);      gDownloadManager.addDownloads(params);    }    catch (e) { }  }    // Set the tooltips  if (!isExtensions) {    var extensionsStrings = document.getElementById("extensionsStrings");#ifdef MOZ_THUNDERBIRD    document.getElementById("installButton").setAttribute("tooltiptext", extensionsStrings.getString("cmdInstallTooltipTheme"));#endif    document.getElementById("uninstallButton").setAttribute("tooltiptext", extensionsStrings.getString("cmdUninstallTooltipTheme"));    document.getElementById("updateButton").setAttribute("tooltiptext", extensionsStrings.getString("cmdUpdateTooltipTheme"));  }}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/1b81ba8d788ab6941ca13c1dbcc82f0937664d28/extensions.js/buggy/toolkit/mozapps/extensions/content/extensions.js