IDC Auto User / Password Filler

By adamruss Last update Oct 21, 2009 — Installed 374 times. Daily Installs: 2, 0, 4, 33, 6, 0, 5, 1, 0, 1, 0, 2, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 4, 0, 0, 0

There are 15 previous versions of this script.

// ==UserScript==
// @name           IDC Auto User/Pass Filler
// @namespace      http://userscripts.org/users/61596
// @description    Automatically fills the login form for the The Interdisciplinary Center (IDC), Herzliya website.
// @include        https://portal.idc.ac.il/CookieAuth.dll*
// @include        https://mp.idc.ac.il/CookieAuth.dll*
// @copyright      adamruss (mail@russ.co.il)
// ==/UserScript==

function set() {
GM_setValue("gmidcUn", prompt("Username"));
GM_setValue("gmidcPw", prompt("Password"));
window.location.reload();
}

if (document.addEventListener) {
window.addEventListener("load", function() {
setTimeout("document.forms[0].elements[7].value = \"idc/"+GM_getValue("gmidcUn", "username")+"\";", 100);
setTimeout("document.forms[0].elements[8].value = \""+GM_getValue("gmidcPw", "password")+"\";", 100);
setTimeout("document.forms[0].elements[9].click()",100);
}, false);
}
else {
window.document.onLoad = function() {
setTimeout("document.forms[0].elements[7].value = \"idc/"+GM_getValue("gmidcUn", "username")+"\";", 100);
setTimeout("document.forms[0].elements[8].value = \""+GM_getValue("gmidcPw", "password")+"\";", 100);
setTimeout("document.forms[0].elements[9].click()",100);
};
}

if(GM_getValue("gmidcUn", "username")=="username" && GM_getValue("gmidcPw", "password")=="password") 

{set();}

GM_registerMenuCommand('Set IDC Username/Password', set);