mirror of
https://github.com/FAUSheppy/flask-json-dream-website
synced 2025-12-06 08:11:35 +01:00
fix lazyloading on high pd displays
This commit is contained in:
@@ -1,8 +1,9 @@
|
|||||||
/* determine which size of image to load */
|
/* determine which size of image to load */
|
||||||
function getSize(src){
|
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 ){
|
if(src.indexOf("scale_fullscreen") > -1 || src.indexOf("wallpaper") > -1 ){
|
||||||
|
trueRes = Math.max(trueRes, 800)
|
||||||
return '?scalex=' + trueRes
|
return '?scalex=' + trueRes
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user