Created
January 6, 2018 15:58
-
-
Save axemclion/859eb3c86de66ec6add8e3ed49b011b6 to your computer and use it in GitHub Desktop.
Revisions
-
axemclion created this gist
Jan 6, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ // ==UserScript== // @name Show Password // @version 1 // @grant none // ==/UserScript== function handleDblClick(e){ var pwd = e.target; var type = pwd.getAttribute('type'); pwd.setAttribute('type', type === 'password' ? 'text': 'password'); } var passwords = document.querySelectorAll("input[type=password]"); for (var i = 0; i < passwords.length; i++){ passwords[i].addEventListener('dblclick', handleDblClick, true); }