game.ui.moveToPage(Array.from(target.classList).filter(c => c != 'goto')[0]);
});
});
-game.ui.root.querySelector('.options select.font').addEventListener('change', (e) => {
+function checkFontSelection(select) {
game.ui.root.classList.remove('font-atkinson', 'font-opendyslexic');
- const newFont = e.target.value;
+ const newFont = select.value;
if(newFont != 'standard') {
game.ui.root.classList.add('font-' + newFont);
}
-});
+}
+checkFontSelection(game.ui.root.querySelector('.options select.font'));
+game.ui.root.querySelector('.options select.font').addEventListener('change', e => checkFontSelection(e.target));
game.ui.moveToPage = (target, skipFade = false) => {
let fadeDuration = 250;
if(skipFade) {