rem: tokenName = self.name; 
add: var sel = document.getElementById("tokenMenu"); sel.setAttribute("hidden", "true"); var tag = document.getElementById("tokenName"); tag.setAttribute("value",tokenName); 
context: function onLoad(){  pw1 = document.getElementById("pw1");  if ("arguments" in window) {    params = window.arguments[0].QueryInterface(nsIDialogParamBlock);    tokenName = params.GetString(1);  } else {    tokenName = self.name;  }  // Set token name in display  var t = document.getElementById("tokenName");  t.setAttribute("value", tokenName);  var bundle = srGetStrBundle("chrome://pippki/locale/pippki.properties");  // If the token is unitialized, don't use the old password box.  // Otherwise, do.  var secmoddb = Components.                  classes[nsPKCS11ModuleDB].                  getService(nsIPKCS11ModuleDB);  var slot = secmoddb.findSlotByName(tokenName);  if (slot) {    var oldpwbox = document.getElementById("oldpw");    var status = slot.status;    if (status == nsIPKCS11Slot.SLOT_UNINITIALIZED        || status == nsIPKCS11Slot.SLOT_READY) {      oldpwbox.setAttribute("disabled", "true");      oldpwbox.setAttribute("type", "text");      oldpwbox.setAttribute("value",                             bundle.GetStringFromName("password_not_set"));       if (status == nsIPKCS11Slot.SLOT_READY) {        oldpwbox.setAttribute("inited", "empty");      } else {        oldpwbox.setAttribute("inited", "true");      }      // Select first password field      document.getElementById('pw1').focus();    } else {      // Select old password field      oldpwbox.setAttribute("inited", "false");      oldpwbox.focus();    }  }  if (params) {    // Return value 0 means "canceled"    params.SetInt(1, 0);  }    checkPasswords();}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/6eca649dcb4345f7d755d9666e2d46d6bad4ae41/password.js/buggy/security/manager/pki/resources/content/password.js