1
0
Fork 0
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:
Luke Pulverenti 2015-05-17 15:50:37 -04:00
parent 0a670a4635
commit c5802fc5ab
38 changed files with 224 additions and 162 deletions

View file

@ -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);
});