mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
multiple imports optimized
This commit is contained in:
parent
2243b35311
commit
5b5d6a45b0
7 changed files with 63 additions and 63 deletions
|
@ -124,16 +124,14 @@ import './style.css';
|
|||
|
||||
export function lazyChildren(elem) {
|
||||
if (userSettings.enableBlurhash()) {
|
||||
const lazyElems = Array.from(elem.querySelectorAll('.lazy'));
|
||||
|
||||
lazyElems.forEach((lazyElem) => {
|
||||
for (const lazyElem of elem.querySelectorAll('.lazy')) {
|
||||
const blurhashstr = lazyElem.getAttribute('data-blurhash');
|
||||
if (!lazyElem.classList.contains('blurhashed', 'non-blurhashable') && blurhashstr) {
|
||||
itemBlurhashing(lazyElem, blurhashstr);
|
||||
} else if (!blurhashstr && !lazyElem.classList.contains('blurhashed')) {
|
||||
lazyElem.classList.add('non-blurhashable');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
lazyLoader.lazyChildren(elem, fillImage);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue