Skip to content

Instantly share code, notes, and snippets.

@cam8001
Created January 8, 2018 03:15
Show Gist options
  • Save cam8001/d58d541284e347c9dafa9687f70e082a to your computer and use it in GitHub Desktop.
Save cam8001/d58d541284e347c9dafa9687f70e082a to your computer and use it in GitHub Desktop.
Convert password fields to plain text
// Readable version
inputs = document.getElementsByTagName('input');
for (i = 0; i < inputs.length; i++) {
if (inputs[i].type == 'password') {
inputs[i].type = 'text'
}
}
// Bookmarklet version
javascript:(function()%7Binputs%20%3D%20document.getElementsByTagName('input')%3Bfor%20(i%3D0%3B%20i%20%3C%20inputs.length%3B%20i%2B%2B)%20%7B%20if%20(inputs%5Bi%5D.type%20%3D%3D%20'password')%20%7Binputs%5Bi%5D.type%20%3D%20'text'%7D%7D%7D)()
@cam8001
Copy link
Author

cam8001 commented Apr 28, 2024

tags for SEO: bookmarklet show password input html field javascript

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment