-
-
Save slachiewicz/767739956168b93f0925eca0552c7bd7 to your computer and use it in GitHub Desktop.
Adds password input field for LastPass on AliorBank Kantor page
This file contains hidden or 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 Kantor | |
// @namespace glorpen | |
// @include https://kantor.aliorbank.pl/login/password | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
var oldInput = document.getElementById("masked-password"); | |
var input = document.createElement("input"); | |
input.style.width = oldInput.offsetWidth; | |
oldInput.style.display = "none"; | |
input.id = "alior-helper"; | |
input.type="password"; | |
oldInput.parentNode.appendChild(input); | |
var fields = Array.prototype.slice.call(oldInput.getElementsByTagName("input")); | |
input.onchange = function(){ | |
for(var k in fields){ | |
var pos = fields[k].getAttribute("id").substring(9); | |
if(pos && fields[k].getAttribute("type") == "password" && fields[k].getAttribute("class").indexOf("disabled") == -1){ | |
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