add: } if (!gCheckUpdateSecurity) { var defaultCheckSecurity = true; try { defaultCheckSecurity = defaultPref.getBoolPref(PREF_EM_CHECK_UPDATE_SECURITY); } catch (e) { }   if (defaultCheckSecurity) { var msgText = getExtensionString("disabledUpdateSecurityMsg"); var buttonLabel = getExtensionString("enableButtonLabel"); var buttonAccesskey = getExtensionString("enableButtonAccesskey"); var notifyData = "addons-enable-updatesecurity"; showMessage("chrome: msgText, buttonLabel, buttonAccesskey, true, notifyData); } 
context: function Startup(){  gExtensionStrings = document.getElementById("extensionsStrings");  gPref = Components.classes["@mozilla.org/preferences-service;1"]                    .getService(Components.interfaces.nsIPrefBranch);  var defaultPref = gPref.QueryInterface(Components.interfaces.nsIPrefService)                         .getDefaultBranch(null);  try {    gCurrentTheme = gPref.getCharPref(PREF_GENERAL_SKINS_SELECTEDSKIN);    gDefaultTheme = defaultPref.getCharPref(PREF_GENERAL_SKINS_SELECTEDSKIN);  }  catch (e) { }  gExtensionsView = document.getElementById("extensionsView");  gExtensionManager = Components.classes["@mozilla.org/extensions/manager;1"]                                .getService(nsIExtensionManager);  var appInfo = Components.classes["@mozilla.org/xre/app-info;1"]                          .getService(Components.interfaces.nsIXULAppInfo)                          .QueryInterface(Components.interfaces.nsIXULRuntime);  gInSafeMode = appInfo.inSafeMode;  gAppID = appInfo.ID;  try {    gCheckCompat = gPref.getBoolPref(PREF_EM_CHECK_COMPATIBILITY);  } catch(e) { }  // Sort on startup and anytime an add-on is installed or upgraded.  gExtensionManager.sortTypeByProperty(nsIUpdateItem.TYPE_ADDON, "name", true);  // Extension Command Updating is handled by a command controller.  gExtensionsView.controllers.appendController(gExtensionsViewController);  gExtensionsView.addEventListener("select", onAddonSelect, false);  initPluginsDS();  gExtensionsView.database.AddDataSource(gPluginsDS);  gExtensionsView.database.AddDataSource(gExtensionManager.datasource);  gExtensionsView.setAttribute("ref", RDFURI_ITEM_ROOT);  updateOptionalViews();  var viewGroup = document.getElementById("viewGroup");  gExtensionsView.focus();  gExtensionsViewController.onCommandUpdate();  // 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);  os.addObserver(gAddonsMsgObserver, "addons-message-notification", false);  gObserverIndex = gExtensionManager.addUpdateListener(gDownloadManager);  if (!gCheckCompat) {    var msgText = getExtensionString("disabledCompatMsg");    var buttonLabel = getExtensionString("enableButtonLabel");    var buttonAccesskey = getExtensionString("enableButtonAccesskey");    var notifyData = "addons-enable-compatibility";    showMessage("chrome://mozapps/skin/extensions/question.png",                msgText, buttonLabel, buttonAccesskey,                true, notifyData);  }  if (gInSafeMode) {    showMessage("chrome://mozapps/skin/extensions/question.png",                getExtensionString("safeModeMsg"),                null, null, true, null);  }  if ("arguments" in window) {    try {      var params = window.arguments[0].QueryInterface(Components.interfaces.nsIDialogParamBlock);      showView("installs");      gDownloadManager.addDownloads(params);    }    catch (e) {      if (window.arguments[0] == "updates-only") {        gUpdatesOnly = true;#ifdef MOZ_PHOENIX        // If we are Firefox when updating on startup don't display context        // menuitems that can open a browser window.        gUpdateContextMenus = gUpdateContextMenusNoBrowser;#endif        document.getElementById("viewGroup").hidden = true;        document.getElementById("extensionsView").setAttribute("norestart", "");        showView("updates");        showMessage("chrome://mozapps/skin/extensions/question.png",                    getExtensionString("newUpdatesAvailableMsg"),                    null, null, true, null);        document.title = getExtensionString("newUpdateWindowTitle", [getBrandShortName()]);      }    }  }  else if (viewGroup.hasAttribute("last-selected") &&           !document.getElementById(viewGroup.getAttribute("last-selected") + "-view").hidden)    showView(viewGroup.getAttribute("last-selected"));  else    showView("extensions");  if (gExtensionsView.selectedItem)    gExtensionsView.scrollBoxObject.scrollToElement(gExtensionsView.selectedItem);  gPref.setBoolPref(PREF_UPDATE_NOTIFYUSER, false);  if (gUpdatesOnly && gExtensionsView.children.length == 0)    window.close();}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/9421/77015ad091f70c235539653b2fbc4f8b9467f722/extensions.js/buggy/toolkit/mozapps/extensions/content/extensions.js