Mouse over password

By sahil2068 Last update Apr 10, 2009 — Installed 1,424 times. Daily Installs: 5, 6, 5, 2, 0, 5, 3, 1, 8, 13, 7, 14, 5, 4, 9, 0, 7, 7, 4, 10, 5, 6, 5, 5, 7, 3, 7, 4, 3, 4, 5, 9
// ==UserScript==
// @name           Mouse over password
// @namespace      Created by sahil
// @description    Shows password fields as plain text when you pass the mouse over them.
// @include        *
// @author         Sahil
// ==/UserScript==

// Last updated on 2008-01-31

function show() {
	var inputs = document.getElementsByTagName('input');
	for (var i=0; i<inputs.length; i++) {
		if (inputs[i].type.toLowerCase() == 'password') {
			inputs[i].addEventListener('mouseover', function() { this.type='text'; }, true);
			inputs[i].addEventListener('mouseout', function() { this.type='password'; }, true);
		}
	}
}

var site = location.href.split('/')[2];

if (site.match(/login\.live\.com/)) { window.addEventListener('load', show, true); }
else { show(); }