GMX autologin
By S3bast1an
—
Last update Jan 19, 2006
—
Installed
1,064 times.
// ==UserScript==
// @name GMX autologin
// @namespace http://www.gmx.de
// @description Automatically submits the GMX login form if your username and password were automatically filled in (typically by the Firefox password manager). This script only logs in when necessary.
// @include *gmx.de*
// ==/UserScript==
// Milliseconds to wait for form to autofill (necessary in Fx 1.5 - slower computers may need longer wait)
var timer = 1000;
var timo, maySubmit = true; // Not currently typing (so we can submit it)
// Locate form elements
var form = document.forms.namedItem('login');
var uid = form.elements.namedItem('id');
var pw = form.elements.namedItem('p');
// Don't submit form as we are typing into it
pw.addEventListener('keydown', function(e) {
maySubmit = false;
clearTimeout(timo);
timo = setTimeout(function() {
maySubmit = true;
doSignIn();
}, 2000);
}, true);
function doSignIn() {
//form.submit();
if(uid.value.length && pw.value.length && maySubmit) { // Form must be non-empty and not being typed into
form.submit();
} else { // Bide our time...
window.setTimeout(doSignIn, timer);
}
}
// Attempt to sign in
doSignIn();