X-Git-Url: http://git.shiar.net/minimedit.git/blobdiff_plain/ef5176dcf0f6d0ebe26834871ce596099c6d0085..a1bb8561064d0985ecb6c65054bf352f667bc9b7:/foto/album.inc.php diff --git a/foto/album.inc.php b/foto/album.inc.php index 5e1a148..c3f3464 100644 --- a/foto/album.inc.php +++ b/foto/album.inc.php @@ -26,7 +26,7 @@ function openphotoswipe(index) { @@ -74,6 +74,7 @@ function imgjustify() { targetRowHeight: 200, }; var layout = require('justified-layout')(ratios, config); + var thumbreplace = !/[?&]blur\b/.test(window.location.search); gallery.style.position = 'relative'; gallery.style.height = layout.containerHeight + 'px'; @@ -86,16 +87,18 @@ function imgjustify() { imgel.style.top = layout.boxes[i].top + 'px'; imgel.style.left = layout.boxes[i].left + 'px'; - var thumbtarget = imgel.src.replace(/(\/thumb\/)\d+/, '$1'+layout.boxes[i].height) - if (imgel.complete) { - imgel.src = thumbtarget; - } - else if (thumbtarget != imgel.src) { - var loadthumb = new Image(); - loadthumb.src = thumbtarget; - loadthumb.onload = function() { - imgel.src = this.src; - }; + if (thumbreplace) { + var thumbtarget = imgel.src.replace(/(\/thumb\/)\d+/, '$1'+layout.boxes[i].height) + if (imgel.complete) { + imgel.src = thumbtarget; + } + else if (thumbtarget != imgel.src) { + var loadthumb = new Image(); + loadthumb.src = thumbtarget; + loadthumb.onload = function() { + imgel.src = this.src; + }; + } } })(); }