diff options
| author | 2014-03-15 14:32:09 +0100 | |
|---|---|---|
| committer | 2014-03-15 14:32:09 +0100 | |
| commit | 53d31c022dc107f7ad712fa91e4266f1e12d3c01 (patch) | |
| tree | 75ca72c0a6b549b021aebbd11767cd3280f6d1c2 /p/scripts | |
| parent | 2791684e7242efe7f3b27717825323b3e1d6618e (diff) | |
| parent | 1af723ca68e2558232ef4c4eb5a7c8f41a07bd0c (diff) | |
Merge pull request #461 from aledeg/password
Add a button to reveal/hide password
Diffstat (limited to 'p/scripts')
| -rw-r--r-- | p/scripts/main.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/p/scripts/main.js b/p/scripts/main.js index 898ec8c69..bee56d1b3 100644 --- a/p/scripts/main.js +++ b/p/scripts/main.js @@ -998,6 +998,17 @@ function init_feed_observers() { }); }; +function init_password_observers() { + $('input[type="password"] + a.btn.toggle-password').on('click', function(e){ + e.preventDefault(); + var passwordField = $(this).siblings('input[type="password"]'); + passwordField.attr('type','text'); + setTimeout(function(){ + passwordField.attr('type','password'); + },2000); + }); +}; + function init_all() { if (!(window.$ && window.url_freshrss && ((!full_lazyload) || $.fn.lazyload))) { if (window.console) { @@ -1030,6 +1041,7 @@ function init_all() { } else { init_share_observers(); init_feed_observers(); + init_password_observers(); } if (window.console) { |
