1.0.14 fix js on images

This commit is contained in:
infeeeee
2019-10-08 17:15:27 +02:00
parent 5698d30b20
commit adf4fac0b6
3 changed files with 6 additions and 4 deletions

View File

@@ -50,7 +50,7 @@
slideshowSpeed: 2500,
slideshowStart: "start slideshow",
slideshowStop: "stop slideshow",
photoRegex: /(.*)-\d{2,}x\d{2,}\.(gif|png|jp(e|g|eg)|bmp|ico|webp|jxr|svg)((#|\?).*)?$/i,
photoRegex: /(.*)(-\d{2,}x\d{2,})?\.(gif|png|jp(e|g|eg)|bmp|ico|webp|jxr|svg)((#|\?).*)?$/i,
// alternate image paths for high-res displays
retinaImage: false,
@@ -253,7 +253,9 @@
}
function retinaUrl(settings, url) {
return settings.get('retinaUrl') ? url.replace(settings.get('photoRegex'), settings.get('retinaSuffix')) : url;
console.log(url)
console.log(url.replace(settings.get('photoRegex'), settings.get('retinaSuffix')))
return settings.get('retinaUrl') && window.devicePixelRatio > 1 ? url.replace(settings.get('photoRegex'), settings.get('retinaSuffix')) : url;
}
function trapFocus(e) {

View File

@@ -1152,7 +1152,7 @@
onOpen: disableScroll,
onClosed: enableScroll,
retinaUrl: true,
retinaSuffix: '$1.$2'
retinaSuffix: '$1.$3'
}

View File

@@ -2,7 +2,7 @@
Theme Name: dis-2019
Theme URI: https://git.gyetpet.dynu.net/infeeeee/dis-2019
Description: Designisso téma 2019 | <a target="_blank" href="https://git.gyetpet.dynu.net/infeeeee/dis-2019/src/branch/master/K%c3%89ZIK%c3%96NYV.md">Használati utasítás magyarul</a> | <a target="_blank" href="https://git.gyetpet.dynu.net/infeeeee/dis-2019/issues">Hibák, problémák jelentése</a>
Version: 1.0.13
Version: 1.0.14
Author: Gyetvai Péter
Author URI: https://gyetvai-peter.hu
Tags: Designisso