diff options
author | Sebastian Morr <sebastian@morr.cc> | 2017-04-21 18:17:21 +0200 |
---|---|---|
committer | Eugen <eugen@zeonfederated.com> | 2017-04-21 18:17:21 +0200 |
commit | 74c474a652d32294394ef7b329d1bcddb64cc2e0 (patch) | |
tree | 4a4be62d4b17c43dbb65664b2f3748148d9e806b /app/assets | |
parent | 5e33ad29d48dcd150d13dfa40151ff21592e728a (diff) |
Display remaining characters when editing display name and bio (#2219)
Diffstat (limited to 'app/assets')
-rw-r--r-- | app/assets/javascripts/extras.jsx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/assets/javascripts/extras.jsx b/app/assets/javascripts/extras.jsx index c13feceff..29c37b9e1 100644 --- a/app/assets/javascripts/extras.jsx +++ b/app/assets/javascripts/extras.jsx @@ -37,4 +37,12 @@ $(() => { $(e.target).parent().attr('style', null); } }); + + // used on /settings/profile + $('.account_display_name').on('input', e => { + $('.name-counter').text(30 - $(e.target).val().length) + }); + $('.account_note').on('input', e => { + $('.note-counter').text(160 - $(e.target).val().length) + }); }); |