Skip to content

Instantly share code, notes, and snippets.

@andrearufo
Last active September 6, 2020 10:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrearufo/4912a98ba9e4a2f00b3fa98894bfbbb5 to your computer and use it in GitHub Desktop.
Save andrearufo/4912a98ba9e4a2f00b3fa98894bfbbb5 to your computer and use it in GitHub Desktop.
Make input password to text
<a href="javascript: (function () { var jsCode = document.createElement('script'); jsCode.setAttribute('src', 'showpassword.js'); document.body.appendChild(jsCode); }());">
Show hidden password
</a>
console.log('Bookmarklet made by andrearufo.it');
var inputs = document.querySelectorAll('input[type=password]');
if (inputs.length > 0) {
console.log('Ok...')
for (i=0; i<=inputs.length; i++){
inputs[i].setAttribute('type', 'text');
}
}else{
console.log('No password fields...')
}
console.log('--> Done')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment