Skip to content

Instantly share code, notes, and snippets.

@LouCypher
Last active October 21, 2024 18:44
Show Gist options
  • Save LouCypher/1870154 to your computer and use it in GitHub Desktop.
Save LouCypher/1870154 to your computer and use it in GitHub Desktop.
Show Password userscripts
// ==UserScript==
// @name Show Password onFocus
// @namespace http://zoolcar9.lhukie.net/
// @description Show password when focus on password field
// @version 20130114.01
// @author LouCypher
// @license free
// @homepageURL http://userscripts.org/scripts/show/1892
// @updateURL https://gist.github.com/raw/1870154/show-password-onfocus.user.js
// @downloadURL https://gist.github.com/raw/1870154/show-password-onfocus.user.js
// @include *
// @grant none
// ==/UserScript==
window.setTimeout(function() {
var passFields = document.querySelectorAll("input[type='password']");
if (!passFields.length) return;
for (var i = 0; i < passFields.length; i++) {
passFields[i].addEventListener("focus", function() {
this.type = "text";
}, false);
passFields[i].addEventListener("blur", function() {
this.type = "password";
}, false);
}
}, 1000)
// ==UserScript==
// @name Show Password onMouseOver
// @namespace http://zoolcar9.lhukie.net/
// @description Show password when mouseover on password field
// @version 20130114.01
// @author LouCypher
// @license free
// @homepageURL http://userscripts.org/scripts/show/1893
// @updateURL https://gist.github.com/raw/1870154/show-password-onmouseover.user.js
// @downloadURL https://gist.github.com/raw/1870154/show-password-onmouseover.user.js
// @include *
// @grant none
// ==/UserScript==
window.setTimeout(function() {
var passFields = document.querySelectorAll("input[type='password']");
if (!passFields.length) return;
for (var i = 0; i < passFields.length; i++) {
passFields[i].addEventListener("mouseover", function() {
this.type = "text";
}, false);
passFields[i].addEventListener("mouseout", function() {
this.type = "password";
}, false);
}
}, 1000)
@CodeIter
Copy link

look good

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