While checking my online bank account (as usual there was a plethora of red “DR” strewn about) when I realised that the login process is far too long and I have to remember far too much (I know it’s for security) so I wrote a couple of javascript bookmarks that let me log in with a click of a bookmark instead of spending hours trying to remember my customer number, pin number and password. Just copy the javscript below onto one line and save it as a bookmark and presto….easy login. [NB. Only tested on Firefox — and you have to replace the dummy customer number, pin number and password with your own for it to work]
Customer Number page
[code lang=”javascript”]
javascript:frames[‘Main’].document.getElementById(‘DBID_edit’).value=”YOURCUSTNUMBER”;
frames[‘Main’].document.getElementById(‘form’).submit();
[/code]
Pin Number and Password page
[code lang=”javascript”]
javascript: var _frame = frames[‘Main’].document;
var _form = _frame.getElementById(‘form’);
var _Pin = new Array(4);
_Pin[‘first’] = “Pin1”;
_Pin[‘second’] = “Pin2”;
_Pin[‘third’] = “Pin3”;
_Pin[‘fourth’] = “Pin4”;
var _Password = new Array(8);
_Password[‘first’] = “Pass1”;
_Password[‘second’] = “Pass2”;
_Password[‘third’] = “Pass3”;
_Password[‘fourth’] = “Pass4”;
_Password[‘fifth’] = “Pass5”;
_Password[‘sixth’] = “Pass6”;
_Password[‘seventh’] = “Pass7”;
_Password[‘eight’] = “Pass8”;
var pinLabelA = _frame.getElementById(‘LI6DDALALabel’).innerHTML;
var pinLabelB = _frame.getElementById(‘LI6DDALBLabel’).innerHTML;
var pinLabelC = _frame.getElementById(‘LI6DDALCLabel’).innerHTML;
var _message = “Pin \n”;
for(var _char in _Pin)
{
if(pinLabelA.indexOf(_char)!= -1)
{
_message+= “first is “+_Pin[_char] + “\n”;
_form.LI6PPEA_edit.value=_Pin[_char];
}
if(pinLabelB.indexOf(_char)!= -1)
{
_message+= “second is “+_Pin[_char] + “\n”;
_form.LI6PPEB_edit.value=_Pin[_char];
}
if(pinLabelC.indexOf(_char)!= -1)
{
_message+= “third is “+_Pin[_char] + “\n”;
_form.LI6PPEC_edit.value=_Pin[_char];
}
}
var passLabelA = _frame.getElementById(‘LI6DDALDLabel’).innerHTML;
var passLabelB = _frame.getElementById(‘LI6DDALELabel’).innerHTML;
var passLabelC = _frame.getElementById(‘LI6DDALFLabel’).innerHTML;
_message+= “\nPassword\n”;
for(var _char in _Password)
{
if(passLabelA.indexOf(_char)!= -1)
{
_message+= “first is “+_Password[_char] + “\n”;
_form.LI6PPED_edit.value=_Password[_char];
}
if(passLabelB.indexOf(_char)!= -1)
{
_message+= “second is “+_Password[_char] + “\n”;
_form.LI6PPEE_edit.value=_Password[_char];
}
if(passLabelC.indexOf(_char)!= -1)
{
_message+= “third is “+_Password[_char] + “\n”;
_form.LI6PPEF_edit.value=_Password[_char];
}
}
alert(_message);
_form.submit();
[/code]