minor fixes

This commit is contained in:
sky
2025-08-23 22:39:31 -04:00
parent f99c78c0a8
commit e42a5a524c
9 changed files with 20 additions and 9 deletions

View File

@ -21,14 +21,19 @@
location.search.substr(1).split("&").forEach((e)=>{
items[e.split("=")[0]] = e.split("=")[1]
});
document.getElementById("gameFrame").setAttribute("src", `/resources/semag/${items.dir}/index.html`);
document.getElementById("gameImage").setAttribute("src", `/resources/semag/${items.dir}/${items.img}`);
if(items.type == "g") {
items.type = "semag";
} else {
items.type = "sppa";
}
document.getElementById("gameFrame").setAttribute("src", `/resources/${items.type}/${items.dir}/index.html`);
document.getElementById("gameImage").setAttribute("src", `/resources/${items.type}/${items.dir}/${items.img}`);
document.getElementById("gameName").innerText = decodeURIComponent(items.title);
console.log(items);
} else if(localStorage.getItem("selenite.lastGame")) {
let game = JSON.parse(decodeURIComponent(atob(localStorage.getItem("selenite.lastGame"))));
document.getElementById("gameFrame").setAttribute("src", `/resources/semag/${game[0]}/index.html`);
document.getElementById("gameImage").setAttribute("src", `/resources/semag/${game[0]}/${decodeURIComponent(game[1])}`);
document.getElementById("gameFrame").setAttribute("src", `/resources/${items.type}/${game[0]}/index.html`);
document.getElementById("gameImage").setAttribute("src", `/resources/${items.type}/${game[0]}/${decodeURIComponent(game[1])}`);
document.getElementById("gameName").innerText = game[2];
}
document.getElementById("fullscreen").addEventListener("click", () => {