| |
|
swisspig.net about contact terms of use privacy policy activity site map |
Hacking Firefox to Make Bank Sites Usable (Saturday, February 24, 2007)So, I was whining about having to type in my account number on one screen, and then type in my password on another screen, despite my insistence that I really do want my browser to remember them. As it turns out, my little autocomplete hack was working for the password. But the browser wasn't recognizing a field by itself with no associated password as a username field, but rather as a search box, or something like that. Since the built-in form completion in Firefox is designed for stuff like search boxes, and not for automatically filling in a lonely user name, I downloaded AutoFormer, which allows you to save the contents of a field via a context menu, and have it automatically fill it in for you next time.
You'd think that would have been the end of it. But no, my bank, in all
of its wisdom, has a script that waits until the page loads, and then
explicitly clears the text field. And because it uses broken HTML, instead
of modern standard HTML, it chose to use the
What a pain. So I used GreaseMonkey, another nifty Firefox toy, to
automatically turn the I tried modifying AutoFormer so that it would call the default handler first, before running its own thing (i.e. making sure it's the final handler to run), but every time I tried to change it, it would stop loading itself. There's probably some cute little "don't change me" aspect that I didn't see, but in any event, I abandoned that, and in the end, I put in a relatively simple GreaseMonkey script that removes the line of code that clears the text area. It works, but I should send a bill to my bank for the lost afternoon. What a pain. In a nutshell, here is the user script I wrote:
var oldload;
function newload(event) {
var target = event ? event.target : this;
oldload = oldload.replace('initialize();',
'/* how about no */');
unsafeWindow.eval(oldload);
}
function redefineload() {
var els = document.getElementsByTagName('body');
for(i=0;i<els.length;i++) {
var x = els[i];
for(j=0;j<x.attributes.length; j++) {
if(x.attributes[j].name.toLowerCase() == 'onload') {
oldload = x.attributes[j].value;
x.attributes[j].value = '';
// instead do this
window.addEventListener('load', newload, true);
}
}
}
}
redefineload();
CommentsNo comments. |
|
All material copyright © 1995-2009 by
Brian Ziman, unless otherwise noted.
| |