Some fixes

This commit is contained in:
2017-07-21 12:55:36 +02:00
parent f30056363b
commit 1cf023e476
4 changed files with 25 additions and 11 deletions

View File

@ -68,6 +68,10 @@ export class AnimeNotifier {
}
init() {
// App init
this.app.init()
// Event listeners
document.addEventListener("readystatechange", this.onReadyStateChange.bind(this))
document.addEventListener("DOMContentLoaded", this.onContentLoaded.bind(this))
document.addEventListener("keydown", this.onKeyDown.bind(this), false)
@ -573,7 +577,6 @@ export class AnimeNotifier {
return delay(300).then(() => {
return request
.then(html => this.app.setContent(html, true))
.then(() => this.app.markActiveLinks())
.then(() => this.app.emit("DOMContentLoaded"))
.then(() => this.loading(false))
.catch(console.error)