From c527534ee58e5f1bb0c33a3c03c88c6972ea4115 Mon Sep 17 00:00:00 2001 From: Tobias Reich Date: Mon, 22 Aug 2016 12:54:12 +0200 Subject: [PATCH] Prefetch big when medium not available --- src/scripts/photo.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/scripts/photo.js b/src/scripts/photo.js index 860ad68..8949e56 100644 --- a/src/scripts/photo.js +++ b/src/scripts/photo.js @@ -82,12 +82,12 @@ photo.preloadNext = function(photoID) { album.json.content[photoID].nextPhoto!='') { let nextPhoto = album.json.content[photoID].nextPhoto + let url = album.json.content[nextPhoto].url let medium = album.json.content[nextPhoto].medium + let href = (medium!=null && medium!=='' ? medium : url) - if (medium!=null && medium!=='') { - $('head [data-prefetch]').remove() - $('head').append(``) - } + $('head [data-prefetch]').remove() + $('head').append(``) }