Revert setTimeout for images
Reduces instances of cached images fading in by giving the browser a bit more time to load them
This commit is contained in:
parent
eeda28a287
commit
0bbb4573b2
1 changed files with 15 additions and 13 deletions
|
|
@ -161,6 +161,7 @@ function setupLazyImages() {
|
|||
}
|
||||
|
||||
afterContentReady(() => {
|
||||
setTimeout(() => {
|
||||
for (let i = 0; i < images.length; i++) {
|
||||
const image = images[i];
|
||||
|
||||
|
|
@ -175,6 +176,7 @@ function setupLazyImages() {
|
|||
});
|
||||
}
|
||||
}
|
||||
}, 1);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -347,11 +349,11 @@ async function setupPage() {
|
|||
pageContentElement.innerHTML = pageContent;
|
||||
|
||||
try {
|
||||
setupLazyImages();
|
||||
setupCarousels();
|
||||
setupCollapsibleLists();
|
||||
setupCollapsibleGrids();
|
||||
setupDynamicRelativeTime();
|
||||
setupLazyImages();
|
||||
} finally {
|
||||
pageElement.classList.add("content-ready");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue