add scroll pos

This commit is contained in:
PossiblyAxolotl 2024-08-15 17:09:13 -06:00
parent d7cdbe14d3
commit 9fc6852e48

View file

@ -123,7 +123,7 @@ function createWindow(url, title, width, height) {
win.innerHTML += frame; win.innerHTML += frame;
win.style.left = ((window.innerWidth / 2) - (Number(width.replace("px","")) / 2)) + "px"; win.style.left = ((window.innerWidth / 2) - (Number(width.replace("px","")) / 2)) + "px";
win.style.top = ((window.innerHeight / 2) - (Number(height.replace("px","")) / 2)) + "px"; win.style.top = ((window.innerHeight / 2) - (Number(height.replace("px","")) / 2) + window.scrollY) + "px";
zIndex ++; zIndex ++;
win.style.zIndex = zIndex; win.style.zIndex = zIndex;