about summary refs log tree commit diff
path: root/app/javascript/packs
diff options
context:
space:
mode:
authorSurinna Curtis <ekiru.0@gmail.com>2017-11-16 01:21:16 -0600
committerSurinna Curtis <ekiru.0@gmail.com>2017-11-16 01:21:16 -0600
commit35fbdc36f92b610e8a73e2acb220e87cf5fc83b0 (patch)
treefcd9bdb5ba49ab7a6a79590c74db858ae77b4239 /app/javascript/packs
parent30237259367a0ef2b20908518b86bbeb358999b5 (diff)
parent88627fd7aa2493a6890d60a5965459e4c7fe6fe9 (diff)
Merge tootsuite/master at 30237259367a0ef2b20908518b86bbeb358999b5
Diffstat (limited to 'app/javascript/packs')
-rw-r--r--app/javascript/packs/application.js7
-rw-r--r--app/javascript/packs/common.js3
-rw-r--r--app/javascript/packs/public.js4
3 files changed, 13 insertions, 1 deletions
diff --git a/app/javascript/packs/application.js b/app/javascript/packs/application.js
index 116632dea..d275c3bb0 100644
--- a/app/javascript/packs/application.js
+++ b/app/javascript/packs/application.js
@@ -1,5 +1,12 @@
 import loadPolyfills from '../mastodon/load_polyfills';
 
+// import default stylesheet with variables
+require('font-awesome/css/font-awesome.css');
+
+import '../styles/application.scss';
+
+require.context('../images/', true);
+
 loadPolyfills().then(() => {
   require('../mastodon/main').default();
 }).catch(e => {
diff --git a/app/javascript/packs/common.js b/app/javascript/packs/common.js
index 96e6f4b16..5ac6504d4 100644
--- a/app/javascript/packs/common.js
+++ b/app/javascript/packs/common.js
@@ -1,6 +1,9 @@
 import { start } from 'rails-ujs';
 import 'font-awesome/css/font-awesome.css';
 
+// import common styling
+require('../styles/common.scss');
+
 require.context('../images/', true);
 
 start();
diff --git a/app/javascript/packs/public.js b/app/javascript/packs/public.js
index a47fc2830..59d0e98dd 100644
--- a/app/javascript/packs/public.js
+++ b/app/javascript/packs/public.js
@@ -1,4 +1,5 @@
 import loadPolyfills from '../mastodon/load_polyfills';
+import { processBio } from '../glitch/util/bio_metadata';
 import ready from '../mastodon/ready';
 
 window.addEventListener('message', e => {
@@ -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);
     }
   });