diff options
Diffstat (limited to 'app/javascript/packs/public.js')
-rw-r--r-- | app/javascript/packs/public.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/javascript/packs/public.js b/app/javascript/packs/public.js index a0e511b0a..ae903cdd3 100644 --- a/app/javascript/packs/public.js +++ b/app/javascript/packs/public.js @@ -4,6 +4,7 @@ import { delegate } from 'rails-ujs'; import emojify from '../mastodon/emoji'; import { getLocale } from '../mastodon/locales'; import loadPolyfills from '../mastodon/load_polyfills'; +import { processBio } from '../mastodon/features/account/util/bio_metadata'; require.context('../images/', true); @@ -87,7 +88,8 @@ function main() { delegate(document, '.account_note', 'input', ({ target }) => { const noteCounter = document.querySelector('.note-counter'); if (noteCounter) { - noteCounter.textContent = 160 - length(target.value); + const noteWithoutMetadata = processBio(target.value).text; + noteCounter.textContent = 500 - length(noteWithoutMetadata); } }); } |