first dev commit
This commit is contained in:
38
loader.html
38
loader.html
@ -16,6 +16,7 @@
|
||||
<script src="/js/main.js"></script>
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
<<<<<<< HEAD
|
||||
if (document.location.hash) {
|
||||
let game = JSON.parse(decodeURIComponent(atob(document.location.hash.substring(1))));
|
||||
document.getElementById("gameFrame").setAttribute("src", `/semag/${game[0]}/index.html`);
|
||||
@ -23,12 +24,24 @@
|
||||
document.getElementById("gameName").innerText = game[2];
|
||||
localStorage.setItem("selenite.lastGame", document.location.hash.substring(1))
|
||||
document.location.hash = '';
|
||||
=======
|
||||
if (location.search != "") {
|
||||
let items = {};
|
||||
location.search.substr(1).split("&").forEach((e)=>{
|
||||
items[e.split("=")[0]] = e.split("=")[1]
|
||||
});
|
||||
document.getElementById("gameFrame").setAttribute("src", `/semag/${items.dir}/index.html`);
|
||||
document.getElementById("gameImage").setAttribute("src", `/semag/${items.dir}/${items.img}`);
|
||||
document.getElementById("gameName").innerText = decodeURIComponent(items.title);
|
||||
console.log(items);
|
||||
>>>>>>> c2041b6 (first dev commit)
|
||||
} else if(localStorage.getItem("selenite.lastGame")) {
|
||||
let game = JSON.parse(decodeURIComponent(atob(localStorage.getItem("selenite.lastGame"))));
|
||||
document.getElementById("gameFrame").setAttribute("src", `/semag/${game[0]}/index.html`);
|
||||
document.getElementById("gameImage").setAttribute("src", `/semag/${game[0]}/${decodeURIComponent(game[1])}`);
|
||||
document.getElementById("gameName").innerText = game[2];
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
document.getElementById("fullscreen").addEventListener("click", () => {
|
||||
|
||||
})
|
||||
@ -38,10 +51,22 @@
|
||||
<link rel="stylesheet" href="/style.css" />
|
||||
<link rel="manifest" href="/manifest.json" />
|
||||
|
||||
=======
|
||||
// document.getElementById("fullscreen").addEventListener("click", () => {
|
||||
|
||||
// })
|
||||
});
|
||||
</script>
|
||||
|
||||
<link rel="stylesheet" href="/css/main.css" />
|
||||
<link rel="stylesheet" href="/css/pages.css" />
|
||||
<link rel="stylesheet" href="/css/loader.css" />
|
||||
>>>>>>> c2041b6 (first dev commit)
|
||||
<!-- seo + other things -->
|
||||
<title>Selenite</title>
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
</head>
|
||||
<<<<<<< HEAD
|
||||
<alerts> </alerts>
|
||||
<body>
|
||||
<header>
|
||||
@ -73,5 +98,18 @@
|
||||
<a href="/support.html">Donate</a>
|
||||
<a href="/about.html">About</a>
|
||||
</footer>
|
||||
=======
|
||||
<body>
|
||||
<div id="gamecontainer">
|
||||
<iframe id="gameFrame" allow="fullscreen" sandbox="allow-downloads allow-forms allow-modals allow-pointer-lock allow-scripts allow-same-origin"></iframe>
|
||||
<div id="infobox">
|
||||
<img id="gameImage" src="favicon.png" />
|
||||
<h2 id="gameName">Selenite</h2>
|
||||
<div class="opposite">
|
||||
<img class="button" id="fullscreen" src="/img/fullscreen.svg">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
>>>>>>> c2041b6 (first dev commit)
|
||||
</body>
|
||||
</html>
|
||||
|
Reference in New Issue
Block a user