Visible Password

Visible password on password field

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @version         1.0.1
// @name Visible Password
// @description Visible password on password field
// @include *
// @icon https://addons.opera.com/media/extensions/55/151155/1.0.0-rev1/icons/icon_64x64.png
// @namespace https://greasyfork.org/users/49201
// ==/UserScript==

var KEY_ENTER = 13;
var inputs = document.querySelectorAll('input[type=password]');

function insec(i){
    function hidePassword()
    {
        inputs[i].type = 'password';
    }
    function showPassword()
    {
        inputs[i].type = 'text';
    }
    function onBeforeSubmit(e)
    {
        if (e.keyCode === KEY_ENTER) hidePassword();
    }
    inputs[i].addEventListener('focus', showPassword);
    inputs[i].addEventListener('blur', hidePassword);
    inputs[i].addEventListener('keydown', onBeforeSubmit);
}

for
    (var i = 0;
     i < inputs.length;
     i++)
    insec(i);