context: function Startup(){  // xpconnect to cookiemanager interface  cookiemanager = Components.classes["@mozilla.org/cookiemanager;1"].getService();  cookiemanager = cookiemanager.QueryInterface(Components.interfaces.nsICookieManager);  // xpconnect to permissionmanager interface  permissionmanager = Components.classes["@mozilla.org/permissionmanager;1"].getService();  permissionmanager = permissionmanager.QueryInterface(Components.interfaces.nsIPermissionManager);  // intialise string bundle  if (!gDateService) {    gDateService = Components.classes[nsScriptableDateFormat_CONTRACTID]      .getService(nsIScriptableDateFormat);  }  bundle = srGetStrBundle(JS_STRINGS_FILE);  // install imageblocker tab if instructed to do so by the "imageblocker.enabled" pref  try {    var pref = Components.classes["@mozilla.org/preferences-service;1"]                         .getService(Components.interfaces.nsIPrefBranch);    try {      if (pref.getBoolPref("imageblocker.enabled")) {        var element;        element = document.getElementById("imagesTab");        element.setAttribute("hidden","false" );        element = document.getElementById("images");        element.setAttribute("hidden","false" );      }    } catch(e) {    }    try {      var tab = window.arguments[0];      var element2 = document.getElementById("tabbox");      if (tab == "0") {        element = document.getElementById("cookiesTab");        element2.selectedTab = element;        element = document.getElementById("imagesTab");        element.setAttribute("hidden","true" );      } else {        element = document.getElementById("cookieviewer");        element.setAttribute("title", bundle.GetStringFromName("imageTitle"));        element = document.getElementById("imagesTab");        element2.selectedTab = element;        element = document.getElementById("serversTab");        element.setAttribute("hidden","true" );        element = document.getElementById("cookiesTab");        element.setAttribute("hidden","true" );      }    } catch(e) {    }  } catch (ex) {    dump("failed to get prefs service!\n");    pref = null;  }   loadCookies();  loadPermissions();  window.sizeToContent();}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/b5cc0e55e627e69de7a57125a7c5fe338fda8afa/CookieViewer.js/buggy/extensions/wallet/cookieviewer/CookieViewer.js