fix lazyloading on high pd displays

This commit is contained in:
Yannik Schmidt
2020-09-09 20:45:36 +02:00
parent e46a229f85
commit 0bc7e68e83

View File

@@ -1,8 +1,9 @@
/* determine which size of image to load */
function getSize(src){
var trueRes = screen.width/window.devicePixelRatio
var trueRes = screen.width/Math.min(window.devicePixelRatio, 4)
if(src.indexOf("scale_fullscreen") > -1 || src.indexOf("wallpaper") > -1 ){
trueRes = Math.max(trueRes, 800)
return '?scalex=' + trueRes
}