fix regex for always full size image in lightbox

This commit is contained in:
infeeeee
2019-10-08 21:32:35 +02:00
parent adf4fac0b6
commit ae10f90786
3 changed files with 3 additions and 12 deletions

View File

@@ -1,9 +0,0 @@
# Single - ✔
og: tag: pluginnal!
# egyéb
`@media print{}`
scroll a galléria nézetben

View File

@@ -50,7 +50,7 @@
slideshowSpeed: 2500, slideshowSpeed: 2500,
slideshowStart: "start slideshow", slideshowStart: "start slideshow",
slideshowStop: "stop 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 // alternate image paths for high-res displays
retinaImage: false, retinaImage: false,
@@ -255,7 +255,7 @@
function retinaUrl(settings, url) { function retinaUrl(settings, url) {
console.log(url) console.log(url)
console.log(url.replace(settings.get('photoRegex'), settings.get('retinaSuffix'))) 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; return settings.get('retinaUrl') ? url.replace(settings.get('photoRegex'), settings.get('retinaSuffix')) : url;
} }
function trapFocus(e) { function trapFocus(e) {

View File

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