Fixed image loading bug

This commit is contained in:
Eduard Urbach 2017-07-15 17:07:24 +02:00
parent 1fd9c284de
commit 10709fe25a
2 changed files with 9 additions and 2 deletions

View File

@ -53,7 +53,9 @@ export class Diff {
} }
// Ignore lazy images if they have the same source // Ignore lazy images if they have the same source
if(elemA.classList.contains("lazy") && elemA.dataset.src === elemB.dataset.src) { if(elemA.classList.contains("lazy")) {
elemA.dataset.src = elemB.dataset.src
elemA.title = elemB.title
continue continue
} }

View File

@ -73,6 +73,11 @@ self.addEventListener("message", (evt: any) => {
url url
} }
// If a subpage has refreshed, refresh the main page cache, too.
if(url.includes("/_/")) {
}
let cacheRefresh = CACHEREFRESH.get(url) let cacheRefresh = CACHEREFRESH.get(url)
if(!cacheRefresh) { if(!cacheRefresh) {
@ -87,7 +92,7 @@ self.addEventListener("message", (evt: any) => {
}) })
self.addEventListener("fetch", async (evt: FetchEvent) => { self.addEventListener("fetch", async (evt: FetchEvent) => {
let request = evt.request let request = evt.request as Request
let isAuth = request.url.includes("/auth/") || request.url.includes("/logout") let isAuth = request.url.includes("/auth/") || request.url.includes("/logout")
let ignoreCache = request.url.includes("/api/") || request.url.includes("chrome-extension") let ignoreCache = request.url.includes("/api/") || request.url.includes("chrome-extension")