diff options
Diffstat (limited to 'app/javascript/packs')
-rw-r--r-- | app/javascript/packs/application.js | 7 | ||||
-rw-r--r-- | app/javascript/packs/common.js | 3 | ||||
-rw-r--r-- | app/javascript/packs/public.js | 4 |
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); } }); |