[Glitch] Remove redundant ready() wrapper

Port bb51c0676d to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
shrike
Christian Schmidt 2023-08-18 12:06:08 +02:00 committed by Claire
parent 7b09f585fa
commit e67c28a5fe
1 changed files with 125 additions and 128 deletions

View File

@ -14,7 +14,6 @@ import emojify from 'flavours/glitch/features/emoji/emoji';
import loadKeyboardExtensions from 'flavours/glitch/load_keyboard_extensions'; import loadKeyboardExtensions from 'flavours/glitch/load_keyboard_extensions';
import { loadLocale, getLocale } from 'flavours/glitch/locales'; import { loadLocale, getLocale } from 'flavours/glitch/locales';
import { loadPolyfills } from 'flavours/glitch/polyfills'; import { loadPolyfills } from 'flavours/glitch/polyfills';
import ready from 'flavours/glitch/ready';
const messages = defineMessages({ const messages = defineMessages({
usernameTaken: { id: 'username.taken', defaultMessage: 'That username is taken. Try another' }, usernameTaken: { id: 'username.taken', defaultMessage: 'That username is taken. Try another' },
@ -42,7 +41,6 @@ function main() {
}; };
}; };
ready(() => {
const locale = document.documentElement.lang; const locale = document.documentElement.lang;
const dateTimeFormat = new Intl.DateTimeFormat(locale, { const dateTimeFormat = new Intl.DateTimeFormat(locale, {
@ -195,7 +193,6 @@ function main() {
const message = (statusEl.dataset.spoiler === 'expanded') ? (localeData['status.show_less'] || 'Show less') : (localeData['status.show_more'] || 'Show more'); const message = (statusEl.dataset.spoiler === 'expanded') ? (localeData['status.show_less'] || 'Show less') : (localeData['status.show_more'] || 'Show more');
spoilerLink.textContent = (new IntlMessageFormat(message, locale)).format(); spoilerLink.textContent = (new IntlMessageFormat(message, locale)).format();
}); });
});
const toggleSidebar = () => { const toggleSidebar = () => {
const sidebar = document.querySelector('.sidebar ul'); const sidebar = document.querySelector('.sidebar ul');