// ==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";
  }
 }
}