// ==UserScript==
// @name           password2text
// @namespace      http://eldar.cz/myf/firefox/
// @description    switches password inputs to text while focused
// @include        *
// ==/UserScript==

for ( var i = 0; i < document.forms.length; i++ ){
 var f = document.forms[i];
 for ( var j = 0; j < f.elements.length; j++ ){
  var e = f.elements[j];
  if ( e.getAttribute('type') == 'password' ){
   e.addEventListener('focus',
    function(){this.setAttribute('type','text')},
    true);
   e.addEventListener('blur',
    function(){this.setAttribute('type','password')},
    true);
//   e.className += " GM_PasswordField";
  }
 }
}

// this is simplified verion of the original "Unhide Passwords" ext:
// http://www.contrex.ca/gecko/ (seems like a nice example of a simple ext ;])
// as userscript this simple script works in framesets as well :)
