15 lines
461 B
TypeScript
Raw Normal View History

2017-06-19 14:49:24 +00:00
import { Application } from "./Application"
import { AnimeNotifier } from "./AnimeNotifier"
2017-06-19 01:59:59 +00:00
2017-06-19 14:49:24 +00:00
let app = new Application()
let arn = new AnimeNotifier(app)
2017-06-19 14:20:46 +00:00
2017-06-19 15:45:27 +00:00
document.addEventListener("DOMContentLoaded", arn.onContentLoaded.bind(arn))
document.addEventListener("readystatechange", arn.onReadyStateChange.bind(arn))
2017-06-19 14:20:46 +00:00
window.onpopstate = e => {
if(e.state)
app.load(e.state, false)
else if(app.currentURL !== app.originalURL)
app.load(app.originalURL, false)
}