Skip to content

Commit 351a306

Browse files
author
prima
committed
feat: Tweaked the background res to be far higher if using allow HD as an option
1 parent 361a3da commit 351a306

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

klite.embd

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7615,14 +7615,19 @@ Current version indicated by LITEVER below.
76157615
let selectedImg = null;
76167616
selectedImg = input.files[0];
76177617
const objectURL = URL.createObjectURL(selectedImg);
7618+
let maxRes = 1024, quality = 0.5;
7619+
if (!!localsettings?.img_allowhd)
7620+
{
7621+
maxRes = 8000, quality = 0.95;
7622+
}
76187623
compressImage(objectURL, (compressedImageURI, aspectratio)=>{
76197624
selectedImg = `url('${compressedImageURI}')`;
76207625
document.body.style.backgroundImage = selectedImg;
76217626
document.getElementById("gamescreen").classList.add("translucentbg");
76227627
document.getElementById("enhancedchatinterface").classList.add("transparentbg");
76237628
document.getElementById("enhancedchatinterface_inner").classList.add("transparentbg");
76247629
indexeddb_save("bgimg", compressedImageURI);
7625-
}, false, 1024, 0.5);
7630+
}, false, maxRes, quality);
76267631
}
76277632
};
76287633
function clear_bg_img()

0 commit comments

Comments
 (0)