mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-10-20 02:11:52 -04:00
Improve toggle-password
Add class "active" to button which reveals the password and remove it when revealing is terminated
This commit is contained in:
1 parent
92993b26a8
commit
5ea82076fa
1 file changed
+7
-1
+7
-1
@@ -1008,12 +1008,18 @@ function init_feed_observers() {
|
||||
|
||||
function init_password_observers() {
|
||||
$('input[type="password"] + a.btn.toggle-password').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
var button = $(this);
|
||||
var passwordField = $(this).siblings('input[type="password"]');
|
||||
|
||||
passwordField.attr('type', 'text');
|
||||
button.addClass('active');
|
||||
|
||||
setTimeout(function() {
|
||||
passwordField.attr('type', 'password');
|
||||
button.removeClass('active');
|
||||
}, 2000);
|
||||
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user