This commit is contained in:
parent
81fb811111
commit
00bbb5c015
3 changed files with 37 additions and 47 deletions
|
@ -5,8 +5,8 @@
|
|||
const hardCacheEnabled = templateData.getAttribute('data-hard-cache-enabled') === 'true';
|
||||
|
||||
// Track all favicon/image elements and their IDs
|
||||
const allMediaElements = [];
|
||||
const allMediaIds = [];
|
||||
let allMediaElements = [];
|
||||
let allMediaIds = [];
|
||||
let statusCheckTimeout = null;
|
||||
|
||||
// Add loading effects to image/favicon and associated text
|
||||
|
@ -93,11 +93,9 @@
|
|||
addLoadingEffects(imgElement);
|
||||
|
||||
|
||||
if (hardCacheEnabled) {
|
||||
imgElement.src = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=';
|
||||
} else {
|
||||
imgElement.src = '/static/images/placeholder.svg';
|
||||
}
|
||||
if (!hardCacheEnabled) {
|
||||
imgElement.src = ''; // don't show anything until actual URL arrives
|
||||
}
|
||||
|
||||
// Schedule a status check if not already pending
|
||||
if (!statusCheckTimeout) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue