This commit is contained in:
2017-11-03 18:10:31 +01:00
parent a459f2aa9a
commit 8af94d4800
10 changed files with 172 additions and 151 deletions

View File

@ -10,5 +10,7 @@ export function load(arn: AnimeNotifier, element: HTMLElement) {
export function diff(arn: AnimeNotifier, element: HTMLElement) {
let url = element.dataset.url || (element as HTMLAnchorElement).getAttribute("href")
arn.diff(url).then(() => arn.scrollTo(element))
arn.diff(url)
.then(() => arn.scrollTo(element))
.catch(console.error)
}

View File

@ -509,7 +509,7 @@ export class AnimeNotifier {
modifyDelayed(className: string, func: (element: HTMLElement) => void) {
const maxDelay = 1000
const delay = 20
const delay = 18
let time = 0
let start = Date.now()
@ -596,7 +596,7 @@ export class AnimeNotifier {
this.loading(true)
// Delay by transition-speed
return delay(300).then(() => request)
return delay(200).then(() => request)
.then(html => this.app.setContent(html, true))
.then(() => this.app.emit("DOMContentLoaded"))
.then(() => this.loading(false))