Skip to content

Instantly share code, notes, and snippets.

@agrahamg
Last active December 12, 2015 02:38
Show Gist options
  • Save agrahamg/4699957 to your computer and use it in GitHub Desktop.
Save agrahamg/4699957 to your computer and use it in GitHub Desktop.
Small bit of javascript that lets you type in a pin for ing / capitalOne360 instead of using the keypad. Works well if you create a bookmarklet to use it.
emptyText("pin");
var keypadImages = document.getElementsByClassName('keypad')[1].getElementsByTagName('*');
var keypad = {};
var keypadInput = KEYPAD_HANDLER_MAP["pin"];
for (var i=0;keypadImages.length > i;i++){
var mUpFunction = keypadImages[i].onmouseup;
if (mUpFunction != null){
mUpFunction = mUpFunction.toString();
keypad[mUpFunction.charAt(61)] = mUpFunction.charAt(57);
}
}
var pin = window.prompt("Enter your pin","");
for (var i=0;i < pin.length;i++){
keypadInput.handleClick(keypad[pin[i]]);
}
submitForm();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment