Display remaining characters when editing display name and bio (#2219)

This commit is contained in:
Sebastian Morr
2017-04-21 18:17:21 +02:00
committed by Eugen
parent 5e33ad29d4
commit 74c474a652
3 changed files with 12 additions and 4 deletions

View File

@ -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)
});
});