Don't allow Chrome to try to spellcheck/autocorrect these values.
Make the password field more like a standard password field.
<body>
<table>
<tr>
- <td>URL:</td><td><input type='text' id='url' size=40></td>
+ <td>URL:</td>
+ <td><input type='text' id='url' size=40
+ autocapitalize='none' autocorrect='off' spellcheck='false'></td>
</tr>
<tr>
- <td>User:</td><td><input type='text' id='user' size=40></td>
+ <td>User:</td>
+ <td><input type='text' id='user' size=40
+ autocapitalize='none' autocorrect='off' spellcheck='false'></td>
</tr>
<tr>
- <td>Pass:</td><td><input type='text' id='pass' size=40></td>
+ <td>Pass:</td>
+ <td><input type='password' id='pass' size=30
+ autocapitalize='none' autocorrect='off' spellcheck='false'> <button id='show-pass'>👁</button></td>
</tr>
</table>
}
}
+function toggle_visible_pass() {
+ const ele = document.getElementById('pass');
+ ele.type = (ele.type == 'password') ? 'text' : 'password';
+ // Disable form submission.
+ return false;
+}
+
window.onload = function() {
storage.get(settings_keys, function(settings) {
var field = document.getElementById('save');
field.onkeydown = keydown;
});
});
+ document.getElementById('show-pass').onclick = toggle_visible_pass;
};