Sorry, there are no scripts tagged tribalwarsenhancer;msg6795
There are 1 previous version of this script.
// ==UserScript==
// @name TOL Auto-Login
// @namespace http://bah.com
// @description Automatically login to TOL
// @include http*://tol*.bah.com/
// @include http*://tol*.bah.com/default.cfm
// @include https://secure.bah.com/,DanaInfo=tol.bah.com+default.cfm
// @exclude http*://tol*.bah.com/main.cfm
// ==/UserScript==
// Notes:
// * is a wildcard character
// .tld is magic that matches all top-level domains (e.g. .com, .co.uk, .us, etc.)
(function() {
var tolUsername = GM_getValue("tolUsername",false);
var tolPassword = GM_getValue("tolPassword",false);
var loginFlag = true;
window.setLogin = function(event){
loginFlag=false;
tolUsername=prompt("Enter your employee ID");
GM_setValue("tolUsername", tolUsername);
tolUsername=GM_getValue("tolUsername",false);
tolPassword=prompt("Enter your tol password");
GM_setValue("tolPassword", tolPassword);
tolPassword=GM_getValue("tolPassword",false);
loginFlag=true;
event.preventDefault()
}
var links = document.createElement("a");
links.innerHTML = '<div id="tolSetAuth" style="cursor: pointer; border-style:outset;border-color:#AAAAAA;width:180px;margin:5px;font-size:large;text-align:center;background-color:#EFEFEF; height:30px;color: #000000;"><p style="margin: 2px 2px 2px 2px;">Set/Change TOL Login</div>';
links.addEventListener('click', setLogin, true);
document.body.insertBefore(links, document.body.firstChild);
window.tolLogin = function(){
if(!(GM_getValue("tolUsername",false)==false) && !(GM_getValue("tolPassword",false)==false) && loginFlag==true){
var formA = document.forms.namedItem("loginForm_A");
var empNum = formA.elements.namedItem("employeeNumber");
empNum.value=tolUsername;
var formB = document.forms.namedItem("loginForm_B");
var pass = formB.elements.namedItem("password");
pass.value=tolPassword;
unsafeWindow.MaskVals();
}else{
//alert("Username:" + GM_getValue("tolUsername",false) + " Password:" + GM_getValue("tolPassword",false));
setTimeout(tolLogin,2000);
}
}
//call tolLogin onLoad, pausing in case user wants to set/change user/pass first
setTimeout(tolLogin,1500);
})();
