Fixed UI border color and missing credentials

This commit is contained in:
2017-06-26 20:37:04 +02:00
parent 3d62ab8305
commit 3215714e6a
3 changed files with 9 additions and 13 deletions

View File

@ -154,27 +154,21 @@ export class AnimeNotifier {
}
diffURL(url: string) {
let request = fetch("/_" + url).then(response => response.text())
let request = fetch("/_" + url, {
credentials: "same-origin"
})
.then(response => response.text())
history.pushState(url, null, url)
this.app.currentPath = url
this.app.markActiveLinks()
this.loading(true)
this.unmountMountables()
// for(let element of findAll("mountable")) {
// element.classList.remove("mountable")
// }
this.loading(true)
delay(300).then(() => {
request
.then(html => this.app.setContent(html, true))
.then(() => this.app.markActiveLinks())
// .then(() => {
// for(let element of findAll("mountable")) {
// element.classList.remove("mountable")
// }
// })
.then(() => this.app.emit("DOMContentLoaded"))
.then(() => this.loading(false))
.catch(console.error)