From 7bdf75cb3b6c8e02af53ff4c1f3f1289bb7c9b16 Mon Sep 17 00:00:00 2001 From: Eduard Urbach Date: Tue, 4 Jul 2017 01:20:27 +0200 Subject: [PATCH] Fixed JS bug --- scripts/AnimeNotifier.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/scripts/AnimeNotifier.ts b/scripts/AnimeNotifier.ts index 2a4923b1..1e32d1f9 100644 --- a/scripts/AnimeNotifier.ts +++ b/scripts/AnimeNotifier.ts @@ -45,11 +45,6 @@ export class AnimeNotifier { window.addEventListener("popstate", this.onPopState.bind(this)) this.requestIdleCallback(this.onIdle.bind(this)) - - // Add "osx" class on macs so we can set a proper font-size - if(navigator.platform.includes("Mac")) { - document.rootElement.classList.add("osx") - } } requestIdleCallback(func: Function) { @@ -69,9 +64,17 @@ export class AnimeNotifier { } run() { + // Add "osx" class on macs so we can set a proper font-size + if(navigator.platform.includes("Mac")) { + document.rootElement.classList.add("osx") + } + + // Initiate the elements we need this.user = this.app.find("user") this.app.content = this.app.find("content") this.app.loading = this.app.find("loading") + + // Let's start this.app.run() }