rem: getMore.setAttribute("value", getMore.getAttribute(isExtensions ? "valueextensions" : "valuethemes")); getMore.setAttribute("tooltiptext", getMore.getAttribute(isExtensions ? "tooltiptextextensions" : "tooltiptextthemes")); getMore.setAttribute('href', gGetMoreURL); 
add: try { var getMoreURL = 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); getMoreURL = getMoreURL.replace(/%APPID%/g, app.ID);  getMore.setAttribute("value", getMore.getAttribute(isExtensions ? "valueextensions" : "valuethemes")); getMore.setAttribute("tooltiptext", getMore.getAttribute(isExtensions ? "tooltiptextextensions" : "tooltiptextthemes")); getMore.setAttribute('href', getMoreURL); } catch (e) { getMore.hidden = true; } 
context: function Startup() {  gWindowState = window.location.search.substr("?type=".length, window.location.search.length);    var isExtensions = gWindowState == "extensions";  gItemType   = isExtensions ? nsIUpdateItem.TYPE_EXTENSION : nsIUpdateItem.TYPE_THEME;  var typeCondition = document.getElementById("typeCondition");  typeCondition.setAttribute("object", gItemType);    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);  gApp = Components.classes["@mozilla.org/xre/app-info;1"].getService(Components.interfaces.nsIXULAppInfo)                   .QueryInterface(Components.interfaces.nsIXULRuntime);  // Extension Command Updating is handled by a command controller.  gExtensionsView.controllers.appendController(gExtensionsViewController);  gExtensionsView.addEventListener("extension-updatenow", onExtensionUpdateNow, false);  var pref = Components.classes["@mozilla.org/preferences-service;1"]                       .getService(Components.interfaces.nsIPrefBranch);  var defaultPref = pref.QueryInterface(Components.interfaces.nsIPrefService)                        .getDefaultBranch(null);  if (!isExtensions) {    gExtensionsView.addEventListener("select", onThemeSelect, false);    try {        gCurrentTheme = pref.getCharPref(PREF_GENERAL_SKINS_SELECTEDSKIN);        gDefaultTheme = defaultPref.getCharPref(PREF_GENERAL_SKINS_SELECTEDSKIN);    }    catch (e) { }    var useThemeButton = document.getElementById("useThemeButton");    useThemeButton.hidden = false;    var optionsButton = document.getElementById("optionsButton");    optionsButton.hidden = true;  }  // Finally, update the UI.   gExtensionsView.database.AddDataSource(gExtensionManager.datasource);  gExtensionsView.setAttribute("ref", RDFURI_ITEM_ROOT);  gExtensionsView.focus();    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"));  getMore.setAttribute('href', gGetMoreURL);    if (!isExtensions) {    var themePreviewArea = document.getElementById("themePreviewArea");    themePreviewArea.hidden = false;    gExtensionsView.removeAttribute("flex");    gExtensionsView.style.width = extensionsStrings.getString("themesManagerLeftColumn");  }    // Set Initial Size  var win = document.documentElement;  if (!win.hasAttribute("width") || !win.hasAttribute("height")) {    win.setAttribute("width", isExtensions ? (extensionsStrings.getString("extensionsManagerWidth")) : (extensionsStrings.getString("themesManagerWidth")));    win.setAttribute("height", isExtensions ? (extensionsStrings.getString("extensionsManagerHeight")) : (extensionsStrings.getString("themesManagerHeight")));  }  // 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.addUpdateListener(gDownloadManager);    if ("arguments" in window) {    try {      var params = window.arguments[0].QueryInterface(Components.interfaces.nsIDialogParamBlock);      gDownloadManager.addDownloads(params);    }    catch (e) {      if (window.arguments[0] == "updatecheck")        performUpdate();    }  }    // Set the tooltips  if (!isExtensions) {#ifndef MOZ_PHOENIX    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: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/4c951920de2d5c5c8864517267a2ce9e87d1bf27/extensions.js/clean/toolkit/mozapps/extensions/content/extensions.js