about summary refs log tree commit diff
path: root/app/javascript/packs
diff options
context:
space:
mode:
Diffstat (limited to 'app/javascript/packs')
-rw-r--r--app/javascript/packs/custom.js1
-rw-r--r--app/javascript/packs/public.js4
2 files changed, 4 insertions, 1 deletions
diff --git a/app/javascript/packs/custom.js b/app/javascript/packs/custom.js
new file mode 100644
index 000000000..4db2964f6
--- /dev/null
+++ b/app/javascript/packs/custom.js
@@ -0,0 +1 @@
+require('../styles/custom.scss');
diff --git a/app/javascript/packs/public.js b/app/javascript/packs/public.js
index 0b00da39d..06cc1b53a 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 '../glitch/util/bio_metadata';
 import TimelineContainer from '../mastodon/containers/timeline_container';
 import React from 'react';
 import ReactDOM from 'react-dom';
@@ -101,7 +102,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);
     }
   });
 }