add: var tab = window.arguments[0]; if (tab == "S") { element = document.getElementById("signonTab"); element.setAttribute("selected","true" ); element = document.getElementById("signonTab"); element.setAttribute("style","display: inline;" ); element = document.getElementById("signonSitesTab"); element.setAttribute("style","display: inline;" ); element = document.getElementById("panel"); element.setAttribute("index","0" ); } else if (tab == "W") { element = document.getElementById("signonviewer"); element.setAttribute("title", element.getAttribute("alttitle")); element = document.getElementById("nopreview"); element.setAttribute("selected","true" ); element = document.getElementById("nopreview"); element.setAttribute("style","display: inline;" ); element = document.getElementById("nocapture"); element.setAttribute("style","display: inline;" ); element = document.getElementById("panel"); element.setAttribute("index","2" ); } else { /* invalid value for argument */ }   
context: function Startup(){  signonviewer = Components.classes["component://netscape/signonviewer/signonviewer-world"].createInstance();  signonviewer = signonviewer.QueryInterface(Components.interfaces.nsISignonViewer);  doSetOKCancel(onOK, null);  // init ok event handler  // remove wallet functions (unless overruled by the "wallet.enabled" pref)  try {    pref = Components.classes['component://netscape/preferences'];    pref = pref.getService();    pref = pref.QueryInterface(Components.interfaces.nsIPref);    try {      if (!pref.GetBoolPref("wallet.enabled")) {        var element;        element = document.getElementById("nopreview");        element.setAttribute("style","display: none;" );        element = document.getElementById("nocapture");        element.setAttribute("style","display: none;" );      }    } catch(e) {      dump("wallet.enabled pref is missing from all.js");    }  } catch (ex) {    dump("failed to get prefs service!\n");    pref = null;  }  if (!LoadSignons()) {    return; /* user failed to unlock the database */  }  LoadReject();  LoadNopreview();  LoadNocapture();}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/17929dcf60469c4492bdf716af588dc6d0e0a663/SignonViewer.js/buggy/extensions/wallet/signonviewer/SignonViewer.js