about summary refs log tree commit diff
path: root/app/assets
diff options
context:
space:
mode:
authorSebastian Morr <sebastian@morr.cc>2017-04-21 18:17:21 +0200
committerEugen <eugen@zeonfederated.com>2017-04-21 18:17:21 +0200
commit74c474a652d32294394ef7b329d1bcddb64cc2e0 (patch)
tree4a4be62d4b17c43dbb65664b2f3748148d9e806b /app/assets
parent5e33ad29d48dcd150d13dfa40151ff21592e728a (diff)
Display remaining characters when editing display name and bio (#2219)
Diffstat (limited to 'app/assets')
-rw-r--r--app/assets/javascripts/extras.jsx8
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)
+  });
 });