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)
|
2017-06-20 10:41:26 +00:00
|
|
|
else if(app.currentPath !== app.originalPath)
|
|
|
|
app.load(app.originalPath, false)
|
2017-06-19 14:20:46 +00:00
|
|
|
}
|