Skip to content

Instantly share code, notes, and snippets.

@LouCypher
Last active August 18, 2019 10:16
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