Created
July 8, 2014 16:36
-
-
Save glorpen/e36207839b79bacef01b to your computer and use it in GitHub Desktop.
Creates password input in login form for LastPass support in Alior Bank
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name AliorBank Helper | |
// @namespace glorpen | |
// @include https://aliorbank.pl/hades/do/BANKLOGIN | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
/** | |
* Creates password input for LastPass support in Alior Bank | |
* @author Arkadiusz Dzięgiel | |
*/ | |
var oldLogin = document.getElementById("PASSFIELD1").parentNode; | |
var input = document.createElement("input"); | |
input.style.width = oldLogin.offsetWidth; | |
oldLogin.style.display = "none"; | |
input.id = "alior-helper"; | |
input.type="password"; | |
oldLogin.parentNode.appendChild(input); | |
var fields = Array.prototype.slice.call(document.getElementsByClassName("logField")); | |
input.onchange = function(){ | |
for(var k in fields){ | |
var pos = fields[k].getAttribute("id").substr(9); | |
fields[k].setAttribute("value", input.value.substr(pos-1,1)); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment