Fixed image loading bug
This commit is contained in:
parent
1fd9c284de
commit
10709fe25a
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user