mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
lazy load scripts
This commit is contained in:
parent
0a670a4635
commit
c5802fc5ab
38 changed files with 224 additions and 162 deletions
|
@ -105,6 +105,14 @@
|
|||
});
|
||||
}
|
||||
|
||||
function enableScrollX() {
|
||||
return AppInfo.isTouchPreferred;
|
||||
}
|
||||
|
||||
function getThumbShape() {
|
||||
return enableScrollX() ? 'overflowBackdrop' : 'backdrop';
|
||||
}
|
||||
|
||||
function loadResume(page) {
|
||||
|
||||
var parentId = LibraryMenu.getTopParentId();
|
||||
|
@ -146,7 +154,7 @@
|
|||
|
||||
html += LibraryBrowser.getPosterViewHtml({
|
||||
items: result.Items,
|
||||
shape: "backdrop",
|
||||
shape: getThumbShape(),
|
||||
showTitle: true,
|
||||
showParentTitle: true,
|
||||
lazy: true,
|
||||
|
@ -159,7 +167,7 @@
|
|||
|
||||
html += LibraryBrowser.getPosterViewHtml({
|
||||
items: result.Items,
|
||||
shape: "backdrop",
|
||||
shape: getThumbShape(),
|
||||
showTitle: true,
|
||||
showParentTitle: true,
|
||||
overlayText: screenWidth >= 800 && !AppInfo.hasLowImageBandwidth,
|
||||
|
@ -178,6 +186,12 @@
|
|||
|
||||
var page = this;
|
||||
|
||||
if (enableScrollX()) {
|
||||
$('#resumableItems', page).addClass('hiddenScrollX');
|
||||
} else {
|
||||
$('#resumableItems', page).removeClass('hiddenScrollX');
|
||||
}
|
||||
|
||||
reload(page);
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue