Skip to content

Instantly share code, notes, and snippets.

@gkucmierz
Created March 14, 2017 05:38
Show Gist options
  • Select an option

  • Save gkucmierz/dde9a461d45725db6aa96c173fb57f08 to your computer and use it in GitHub Desktop.

Select an option

Save gkucmierz/dde9a461d45725db6aa96c173fb57f08 to your computer and use it in GitHub Desktop.
var pass = prompt().trim();
[].filter.call($('[type=password]'), el => {
let m = el.id.match(/mask\-([0-9]+)/);
return m && m[1];
}).map(el => {
let m = el.id.match(/mask\-([0-9]+)/);
let n = +m[1];
//el.value = pass.charAt(n-1);
console.log(n, pass.charAt(n-1));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment