Skip to content

Instantly share code, notes, and snippets.

@nathanbrauer
Last active November 25, 2018 21:40
Show Gist options
  • Save nathanbrauer/2c02a17517c7648a6f12bd714ea12323 to your computer and use it in GitHub Desktop.
Save nathanbrauer/2c02a17517c7648a6f12bd714ea12323 to your computer and use it in GitHub Desktop.
Export your passwords from https://passwords.google.com into JSON format that you can use to import into other password managers
var clicks = document.querySelectorAll('.Vaa'),
passwords = {},
wait = false,
idx = 0,
gloival;
gloival = setInterval(function(){
var el, pw, row, pival;
if (!wait) {
wait = true;
el = clicks[idx];
pw = el.previousSibling;
row = el.closest('tr');
passwords[idx] = {
domain: row.querySelector('.Zaa').innerText.trim(),
url: row.querySelector('.qga').innerText.trim(),
user: row.querySelector('.hba').innerText.trim()
};
el.click();
pival = setInterval(function(){
if (pw.value != "••••••••" && pw.value != "Loading...") {
passwords[idx].password = pw.value;
console.log(passwords[idx]);
idx++;
clearInterval(pival);
wait = false;
}
},20);
}
}, 100);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment