add:  /* If database is encrypted and user has not yet supplied master password, * we won't be able to access the data.  In that case, enable the item rather * than asking user for password at this time.  Otherwise you'll be asking for * the password whenever user clicks on edit menu or context menu */ try { if (this.pref.GetBoolPref("wallet.crypto")) {    return enable;  } } catch(e) {  }  
context:     function getStateFromFormsArray(formsArray, captureOrPrefill, threshhold, walletService) {      if (!formsArray) {        return hide;      }      var form;      var bestState = hide;      for (form=0; form<formsArray.length; form++) {        var elementsArray = formsArray[form].elements;        var element;        for (element=0; element<elementsArray.length; element++) {          var type = elementsArray[element].type;          if ((type=="") || (type=="text") || (type=="select-one")) {            // we have a form with at least one text or select element            if (type != "select-one") {              elementCount++;            }            if (bestState == hide) {              bestState = disable;            }            var value;            // obtain saved values if any and store in array called valueList            var valueList;            var valueSequence = walletService.WALLET_PrefillOneElement              (window._content, elementsArray[element]);            // result is a linear sequence of values, each preceded by a separator character            // convert linear sequence of values into an array of values            if (valueSequence) {              var separator = valueSequence[0];              valueList = valueSequence.substring(1, valueSequence.length).split(separator);            }            // see if there's a value on screen (capture case) or a saved value (prefill case)             if (captureOrPrefill == capture) {              // in capture case, see if element has a value on the screen which is not saved              value = elementsArray[element].value;              if (valueSequence && value) {                for (var i=0; i<valueList.length; i++) {                  if (value == valueList[i]) {                    value = null;                    break;                  }                }              }            } else {              // in prefill case, see if element has a saved value              if (valueSequence) {                value = valueList[0];              }            }            if (value) {              // at least one text (or select) element has a value,              //    in which case the capture or prefill item is to appear in menu              bestState = enable;              if (elementCount > threshhold) {                return enable;              }            }          }         }      }      // if we got here, then there was no element with a value or too few elements      return bestState;    }
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/11b261a95792e5c8c7fec2483a5e1aca640f77f2/walletOverlay.js/clean/extensions/wallet/resources/content/walletOverlay.js