about summary refs log tree commit diff
path: root/app/javascript/packs/public.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/javascript/packs/public.js')
-rw-r--r--app/javascript/packs/public.js18
1 files changed, 10 insertions, 8 deletions
diff --git a/app/javascript/packs/public.js b/app/javascript/packs/public.js
index a47fc2830..6adacad98 100644
--- a/app/javascript/packs/public.js
+++ b/app/javascript/packs/public.js
@@ -1,5 +1,6 @@
-import loadPolyfills from '../mastodon/load_polyfills';
-import ready from '../mastodon/ready';
+import loadPolyfills from 'themes/glitch/util/load_polyfills';
+import { processBio } from 'themes/glitch/util/bio_metadata';
+import ready from 'themes/glitch/util/ready';
 
 window.addEventListener('message', e => {
   const data = e.data || {};
@@ -21,12 +22,12 @@ function main() {
   const { length } = require('stringz');
   const IntlRelativeFormat = require('intl-relativeformat').default;
   const { delegate } = require('rails-ujs');
-  const emojify = require('../mastodon/features/emoji/emoji').default;
-  const { getLocale } = require('../mastodon/locales');
+  const emojify = require('../themes/glitch/util/emoji').default;
+  const { getLocale } = require('mastodon/locales');
   const { localeData } = getLocale();
-  const VideoContainer = require('../mastodon/containers/video_container').default;
-  const MediaGalleryContainer = require('../mastodon/containers/media_gallery_container').default;
-  const CardContainer = require('../mastodon/containers/card_container').default;
+  const VideoContainer = require('../themes/glitch/containers/video_container').default;
+  const MediaGalleryContainer = require('../themes/glitch/containers/media_gallery_container').default;
+  const CardContainer = require('../themes/glitch/containers/card_container').default;
   const React = require('react');
   const ReactDOM = require('react-dom');
 
@@ -121,7 +122,8 @@ function main() {
     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);
     }
   });