EaglerForge/sources/setup/workspace_template/javascript/SignedBundleTemplate.txt

621 lines
178 KiB
Plaintext
Raw Normal View History

2024-03-26 02:08:34 -05:00
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="EaglercraftX 1.8 Offline" />
<meta name="keywords" content="eaglercraft, eaglercraftx, minecraft, 1.8, 1.8.8" />
<title>EaglercraftX 1.8</title>
<meta property="og:locale" content="en-US" />
<meta property="og:type" content="website" />
<meta property="og:title" content="EaglercraftX 1.8" />
<meta property="og:description" content="Play minecraft 1.8 in your browser" />
<script type="text/javascript">
function initAPI(version) {
var ModAPI = {};
ModAPI.events = {};
ModAPI.events.types = ["event"];
ModAPI.events.listeners = { "event": [] };
ModAPI.globals = {};
ModAPI.version = version;
2024-03-26 02:08:34 -05:00
ModAPI.addEventListener = function AddEventListener(name, callback) {
if (!callback) {
throw new Error("Invalid callback!");
}
if (ModAPI.events.types.includes(name)) {
if (!Array.isArray(ModAPI.events.listeners[name])) {
ModAPI.events.listeners[name] = [];
}
ModAPI.events.listeners[name].push(callback);
console.log("Added new event listener.");
} else {
throw new Error("This event does not exist!");
}
};
2024-03-26 02:08:34 -05:00
ModAPI.removeEventListener = function removeEventListener(name, func, slow) {
if (!func) {
throw new Error("Invalid callback!");
}
if (!Array.isArray(ModAPI.events.listeners[name])) {
ModAPI.events.listeners[name] = [];
}
var targetArr = ModAPI.events.listeners[name];
if (!slow) {
if (targetArr.indexOf(func) !== -1) {
targetArr.splice(targetArr.indexOf(func), 1);
console.log("Removed event listener.");
}
} else {
var functionString = func.toString();
targetArr.forEach((f, i) => {
if (f.toString() === functionString) {
targetArr.splice(i, 1);
console.log("Removed event listener.");
}
});
}
};
ModAPI.events.newEvent = function newEvent(name) {
ModAPI.events.types.push(name);
};
ModAPI.events.callEvent = function callEvent(name, data) {
if (
!ModAPI.events.types.includes(name) ||
!Array.isArray(ModAPI.events.listeners[name])
) {
if (!Array.isArray(ModAPI.events.listeners[name])) {
if (ModAPI.events.types.includes(name)) {
ModAPI.events.listeners.event.forEach((func) => {
func({ event: name, data: data });
});
return;
}
return;
}
console.error(
"The ModAPI has been called with an invalid event name: " + name
);
console.error("Please report this bug to the repo.");
return;
}
ModAPI.events.listeners[name].forEach((func) => {
func(data);
});
ModAPI.events.listeners.event.forEach((func) => {
func({ event: name, data: data });
});
ModAPI.globals._initUpdate();
};
ModAPI.updateComponent = function updateComponent(component) {
if (
typeof component !== "string" ||
ModAPI[component] === null ||
ModAPI[component] === undefined
) {
return;
}
if (!ModAPI.globals || !ModAPI.globals.onGlobalsUpdate) {
return;
}
if (!ModAPI.globals.toUpdate) {
ModAPI.globals.toUpdate = [];
}
if (ModAPI.globals.toUpdate.indexOf(component) === -1) {
ModAPI.globals.toUpdate.push(component);
}
};
ModAPI.require = function require(component) {
if (typeof component !== "string") {
return;
}
if (!ModAPI.globals || !ModAPI.globals.onRequire) {
return;
}
ModAPI.globals.onRequire(component);
};
ModAPI.globals._initUpdate = function _initUpdate() {
if (!ModAPI.globals.toUpdate) {
ModAPI.globals.toUpdate = [];
}
ModAPI.globals.toUpdate.forEach((id) => {
ModAPI.globals.onGlobalsUpdate(id);
});
ModAPI.globals.toUpdate = [];
};
window.ModAPI = ModAPI;
}
</script>
<script type="text/javascript">
2024-08-01 06:28:34 -05:00
function promisifyIDBRequest(request) {
return new Promise((resolve, reject) => {
request.onsuccess = () => resolve(request.result);
request.onerror = () => reject(request.error);
});
}
2024-03-26 02:08:34 -05:00
function loadLoader() {
2024-08-01 06:28:34 -05:00
window.ModLoader = async function ModLoader(ModsArr) {
2024-03-26 02:08:34 -05:00
if (!window.eaglerMLoaderMainRun) {
var searchParams = new URLSearchParams(location.search);
searchParams.getAll("Mod").forEach((ModToAdd) => {
console.log(
"EaglerML: Adding Mod to loadlist from search params: " + ModToAdd
);
ModsArr.push(ModToAdd);
});
if (
!!eaglercraftXOpts &&
!!eaglercraftXOpts.Mods &&
Array.isArray(eaglercraftXOpts.Mods)
) {
eaglercraftXOpts.Mods.forEach((ModToAdd) => {
console.log(
"EaglerML: Adding Mod to loadlist from eaglercraftXOpts: " +
2024-08-01 06:28:34 -05:00
ModToAdd
2024-03-26 02:08:34 -05:00
);
ModsArr.push(ModToAdd);
});
}
2024-08-01 06:28:34 -05:00
//Reverse engineer eaglercraftx virtual file system to gain external access to mod store WITHOUT messing with java teavm nonsense
var StoreId = null;
var decoder = new TextDecoder("utf-8");
console.log("EaglerML: Searching in iDB");
try {
var dbs = await indexedDB.databases();
for (let i=0; i<dbs.length; i++) {
const db = dbs[i];
if (db.name.endsWith("resourcePacks")) {
StoreId = db.name;
if (StoreId) {
var database = await promisifyIDBRequest(indexedDB.open(StoreId));
var storeIsValid = !!database.objectStoreNames[0];
if (!storeIsValid) {
break;
}
var key = database.objectStoreNames[0].length === 0 ? "filesystem" : database.objectStoreNames[0];
var transaction = database.transaction([key], "readwrite");
var objectStore = transaction.objectStore("filesystem");
var object = await promisifyIDBRequest(objectStore.get(["mods.txt"]));
if (!object) {
break;
}
var mods = decoder.decode(object.data);
if (mods.length === 0) {
break;
}
var modsArr = mods.split("|");
for (var modFilePath of modsArr) {
if (modFilePath.length === 0) {
break;
}
var modUrl = null;
if (modFilePath.startsWith("web@")) {
modUrl = modFilePath.replace("web@", "");
} else {
var modFile = await promisifyIDBRequest(objectStore.get(["mods/" + modFilePath]));
if (!modFile) {
break;
}
var modData = decoder.decode(modFile.data);
var modBlob = new Blob([modData], {
type: 'text/javascript'
});
modUrl = URL.createObjectURL(modBlob);
}
if (!modUrl) {
break;
}
ModsArr.push(modUrl);
console.log("Loaded iDB mod: "+modFilePath);
}
}
}
}
} catch (error) {
console.error(error);
}
2024-03-26 02:08:34 -05:00
window.eaglerMLoaderMainRun = true;
}
if (window.noLoadMods === true) {
ModsArr.splice(0, ModsArr.length);
}
function checkModsLoaded(totalLoaded, identifier) {
console.log(
"EaglerML: Checking if Mods are finished :: " +
2024-08-01 06:28:34 -05:00
totalLoaded +
"/" +
ModsArr.length
2024-03-26 02:08:34 -05:00
);
if (totalLoaded >= ModsArr.length) {
clearInterval(identifier);
window.ModGracePeriod = false;
if (
window.eaglerMLoaderMainRun &&
ModAPI &&
ModAPI.events &&
ModAPI.events.callEvent
) {
ModAPI.events.callEvent("load", {});
}
console.log(
"EaglerML: Checking if Mods are finished :: All Mods loaded! Grace period off."
);
}
}
function methodB(currentMod) {
try {
console.log("EaglerML: Loading " + currentMod + " via method B.");
var script = document.createElement("script");
script.src = currentMod;
script.setAttribute("data-Mod", currentMod);
script.setAttribute("data-isMod", true);
script.onerror = () => {
console.log(
"EaglerML: Failed to load " + currentMod + " via method B!"
);
script.remove();
totalLoaded++;
};
script.onload = () => {
console.log(
"EaglerML: Successfully loaded " + currentMod + " via method B."
);
totalLoaded++;
};
document.body.appendChild(script);
} catch (error) {
console.log(
"EaglerML: Oh no! The Mod " + currentMod + " failed to load!"
);
totalLoaded++;
}
}
window.ModGracePeriod = true;
var totalLoaded = 0;
var loaderCheckInterval = null;
ModsArr.forEach((c) => {
let currentMod = c;
console.log("EaglerML: Starting " + currentMod);
try {
var req = new XMLHttpRequest();
req.open("GET", currentMod);
req.onload = function xhrLoadHandler() {
console.log("EaglerML: Loading " + currentMod + " via method A.");
var script = document.createElement("script");
try {
script.src =
"data:text/javascript," + encodeURIComponent(req.responseText);
} catch (error) {
methodB(currentMod);
return;
}
script.setAttribute("data-Mod", currentMod);
script.setAttribute("data-isMod", true);
script.onerror = () => {
console.log(
"EaglerML: Failed to load " + currentMod + " via method A!"
);
script.remove();
totalLoaded++;
};
script.onload = () => {
console.log(
"EaglerML: Successfully loaded " + currentMod + " via method A."
);
totalLoaded++;
};
document.body.appendChild(script);
};
req.onerror = function xhrErrorHandler() {
methodB(currentMod);
};
req.send();
} catch (error) {
methodB(currentMod);
}
});
loaderCheckInterval = setInterval(() => {
checkModsLoaded(totalLoaded, loaderCheckInterval);
}, 500);
console.log(
"EaglerML: Starting to load " + ModsArr.length + " Mods..."
);
2024-08-01 06:28:34 -05:00
window.returnTotalLoadedMods = function returnTotalLoadedMods() {
2024-03-26 02:08:34 -05:00
return totalLoaded
}
};
}
2024-03-26 02:08:34 -05:00
</script>
<script type="text/javascript">
function displayGui() {
function gui() {
if (document.querySelector("#eaglerpl_gui")) {
document.querySelector("#eaglerpl_gui").remove();
}
localStorage.setItem(
"ml::Mods",
localStorage.getItem("ml::Mods") || "[]"
);
try {
localStorage.setItem(
"ml::Mods",
JSON.stringify(JSON.parse(localStorage.getItem("ml::Mods")))
);
} catch (error) {
localStorage.setItem("ml::Mods", "[]");
}
var Mods = JSON.parse(localStorage.getItem("ml::Mods"));
var container = document.createElement("div");
container.id = "eaglerpl_gui";
container.style = `width:100%; height: 100%; position: fixed; top: 0; left: 0; z-index: 10; color: white; font-family: Minecraftia, sans-serif; overflow-y: scroll; overflow-x: hidden; background-image: url(data:image/png;base64,UklGRhoBAABXRUJQVlA4TA0BAAAvn8AnAIWjtpEECdnA2N0DsTROy7xUqfrWw0jbyLkJKTz0+I20jTT/Bo89e1YR/Wfktm0Y+wNKLobT7QP/n/B7Z/naW26QHoTpHB7LFouyKHlzeHxfCStSuj9KdbC8z1IJ5iWiyQed48vtYJ+lUu0t4VwranS1XMIutSiLYlbb8G54uf2p3VPSfRZtSrlsPFjOzZZrd/us3B3uK+HcHJQql+xbLMrS/WqNpm6DeZ/VIPVYaN/KzUbp91nd9xl5pYu50dU2W417nbdTj5l2Ne92uM9qXNpyf6+oXkabHKXaZ1HS4Iaqpim+1KIJ+0M49/LjNbTGP5mrrMZEuc7Uzcb1ViOJ6TuOt4NGJs+zDgA=); background-color: rgb(60,60,60); background-blend-mode: multiply; background-size: 64px;`;
var title = document.createElement("h1");
title.style = "text-shadow: 0px 0px 4px;";
title.innerHTML = "Mod Manager";
var closeButton = document.createElement("a");
closeButton.style = `margin-left: 2rem; color: red;`;
closeButton.href = "javascript:void(0)";
closeButton.addEventListener("click", () => {
document.querySelector("#eaglerpl_gui").remove();
});
closeButton.innerHTML = "[X]";
title.appendChild(closeButton);
container.appendChild(title);
2024-03-26 02:08:34 -05:00
var warningPoster = document.createElement("p");
warningPoster.style = "font-size: 0.8rem; color: orangered;";
warningPoster.innerHTML =
"Warning: Installing Mods gives them full control over the game. Be cautious when installing them.<br>Mods that have been removed also need a reload to stop running in the background.";
container.appendChild(warningPoster);
var tipPoster = document.createElement("p");
tipPoster.style = "font-size: 0.8rem; color: yellow;";
tipPoster.innerHTML =
"Tip: if the mods say that they failed loading, try refreshing the gui";
container.appendChild(tipPoster);
var table = document.createElement("table");
table.style = "table-layout: fixed; width: 100%";
var headerRow = document.createElement("tr");
headerRow.style = "background: rgb(50,50,50);";
var urlBox = document.createElement("th");
urlBox.style = "text-align: center;";
urlBox.innerHTML = "URL";
headerRow.appendChild(urlBox);
var statusBox = document.createElement("th");
statusBox.style = "text-align: center; width: 15%;";
statusBox.innerHTML = "Status";
headerRow.appendChild(statusBox);
table.appendChild(headerRow);
Mods.forEach((url) => {
var row = document.createElement("tr");
row.style = `box-shadow: 0px 2px 0px grey;`;
var urlBox = document.createElement("td");
urlBox.style = "user-select: text;";
var textWrapper = document.createElement("div");
textWrapper.style = `max-width: 100%; overflow-wrap: anywhere; max-height: 3rem; overflow-y: scroll;`;
textWrapper.innerText = url;
urlBox.append(textWrapper);
row.appendChild(urlBox);
var statusBox = document.createElement("td");
statusBox.innerHTML = ((curl) => {
var targs = document.querySelectorAll("script[data-Mod]");
for (let i = 0; i < targs.length; i++) {
const elem = targs[i];
if (elem.getAttribute("data-Mod") === curl) {
return "LOADED";
}
}
return "FAILED";
})(url);
switch (statusBox.innerHTML) {
case "LOADED":
statusBox.style = "background-color: green; text-align: center;";
break;
case "FAILED":
statusBox.style = "background-color: dimgrey; text-align: center;";
break;
default:
break;
}
var binBtn = document.createElement("button");
binBtn.style =
"background: transparent; text-align: center; color: yellow; cursor: pointer; font-family: 'Minecraftia', sans-serif; text-decoration: underline; border: 0; margin-left: 1rem; font-size: 1rem;";
binBtn.innerHTML = "[X]";
binBtn.addEventListener("click", () => {
if (!window.confirm("Delete Mod?") || Mods.indexOf(url) === -1) {
return;
}
Mods.splice(Mods.indexOf(url), 1);
localStorage.setItem("ml::Mods", JSON.stringify(Mods));
gui();
});
statusBox.appendChild(binBtn);
row.appendChild(statusBox);
table.appendChild(row);
});
2024-03-26 02:08:34 -05:00
var addBtn = document.createElement("button");
addBtn.style =
"background: transparent; text-align: center; color: yellow; cursor: pointer; font-family: 'Minecraftia', sans-serif; text-decoration: underline; border: 0; margin-right: 1rem; font-size: 1rem;";
addBtn.innerHTML = "Add new";
addBtn.addEventListener("click", () => {
var newMod = window.prompt("URL of Mod: ", "http://example.com/example.js");
Mods.push(
newMod
);
localStorage.setItem("ml::Mods", JSON.stringify(Mods));
if(window.ModLoader){
ModLoader([newMod]);
}
gui();
});
2024-03-26 02:08:34 -05:00
var uploadBtn = document.createElement("button");
uploadBtn.style =
"background: transparent; text-align: center; color: yellow; cursor: pointer; font-family: 'Minecraftia', sans-serif; text-decoration: underline; border: 0; font-size: 1rem;";
uploadBtn.innerHTML = "Upload...";
uploadBtn.addEventListener("click", function uploadBtnListener() {
var filePicker = document.createElement("input");
filePicker.type = "file";
filePicker.accept = ".js";
filePicker.addEventListener("input", function onInput() {
if (filePicker.files[0]) {
var reader = new FileReader();
reader.addEventListener("load", function onModRead() {
var newMod = reader.result.replace(";base64", `;fs=${encodeURIComponent(filePicker.files[0].name) || "unknown"};base64`);
Mods.push(newMod);
localStorage.setItem("ml::Mods", JSON.stringify(Mods));
if(window.ModLoader){
ModLoader([newMod]);
}
gui();
});
reader.readAsDataURL(filePicker.files[0]);
}
});
filePicker.click();
});
2024-03-26 02:08:34 -05:00
container.appendChild(table);
container.appendChild(addBtn);
container.appendChild(uploadBtn);
var notice = document.createElement("a");
notice.innerHTML = "Refresh GUI";
notice.href = "javascript:void(0)";
notice.addEventListener("click", function reloadListener() {
setTimeout(gui, 500);
this.remove();
});
notice.style =
"color: yellow; display: block; margin-top: 2rem; width: 0; white-space: nowrap;";
container.appendChild(notice);
ModAPI.events.callEvent("gui", {});
document.body.appendChild(container);
}
gui();
}
</script>
<script type="text/javascript">
function displayanvil(){
var img = document.createElement('img');
img.id = 'anvil';
img.src = 'data:image/gif;base64,R0lGODlhkAGQAff/MQAAAAABBgADBgEAAQEAAgEAAwEABAEBAAEBAQEBAgECAAECAwIAAQIAAQIAAwICAgIDAAMAAgMABQMBAAMBAgMBBAMDAwQAAQQAAwQCBAQEAQQEBAUAAAUDBQUFBQYAAAYBBwYCAQYGBQcBAwgFBggICAkJCQoBAAoKCwsIAwwMDA0AAA0EAQ0KBg4NDg8PDxAQEBERERIFARMBABMTExQLBRQUFBUGAhYRDhYWFhcXFxgMBRkOBxkYGRoaGhsbGxsdJB0dHR4PBB4SCh4eHh8UDR8fHyAWEiAgICIiIiQaFSQkJCUlJSYUBCYdGCYmJicnJygoKCkXCCkpKSofGysrKywaCy0tLS8iGS8vLzAwMDEdDTEmIjIjGDIyMjMzMzQ0NDU1NTYoHjYrJTY2NjgkEzg4ODovKjo6Ojw8PD0rGz4oFj4xJT4yKz4+PkEtHEFBQUI2MENDQ0YwHEZGRkhISEk9Nko1IUpKSk9CO09PT1A7JlBQUFJSUlZAK1ZWVldJQFhYWFpZWFtbW11EL11RTF9fX2BWU2BgYGFJM2FOQWRkZGZNNWZURmZmZmdnZ2hoaGlpaWtra2xSO2xsbG1aTG5ubnBWPnJycnNgU3R0dHVaQnZ2dnhjVnlfSnx8fH1gRn1iTYBkT4CAgIFiSIFoVYJkSIJkSoJkS4JlToJmUIJsW4KCgoNlS4RjToRlSYRmSoSDhIVkS4VnSoVnToVzaIZkT4ZlTIeEgohkSYhqTYhqUomJiYpsUI1vUo12X456bI9xV4+Pj5BzVZGRkZN2V5N6ZJOTk5R2W5Z4XJaFdZd7W5d7Y5d+Z5eXl5h6X5h+W5l8W5l8XZp7X5p9Xpt7W5t9YZubm5x9W52BX52BZZ2dnZ+fn6Ghoa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iMIQVRC+RAwkVfImDII1Uku++kOxbySSsdtFDo40umcILFeTQxSblcAbbwznf+Fo3OUiYJIsOWPFFF1lgYYUTPKRQwQlo6BttJJNM/xLJ3307rcgeX/CwbsEc1/DjcS90geDCZVvKT7obZ2umBrV64UUXcI9hxRI8FOFHJU4/Au3fqKOOryJ3eDEECVnnl2iLHfBghSPoRH7nY90s8aiZK7b9xReaF//FGFmc4Ycj0vKduupQk846GEVsS+EJPnM8MABUGKO7nfvYw8cJpSrZHQ9ZDE988V58AcYXZ8TBxyEkR506vvhKa/8he4xRRAcOuA/HYIeAmJ3JCjb73pS8sYT7AM9MStCc+tTXvuMdbwxz2MMhoIav+3WQb5BQRCP4cIYhnIA7F3OQ+bpTg02UR4E40kchSoAm4KkIBukb3vsmSMEuvC9+fjiEIv8+eL++GdFvjejfEVqQgkWRCj9ZGAcMN4QZcEAhW0niWAeQUEH37XCCWNgcFrLwPgzOTxGOiBr+IGFE50WCdJXo3xJkZaruuCASlJridP4jiBTM6kU4iMMe3uBFMHyRgpvLAufcd4Y5zI95j9Df8zj4N0WQcAmVg5AVyoEzPaYHMeCwQpqWZIVCRHIPZzAk8Q65vs1xrgteAEMjNdgI5tlvX39bo/0ccUm7AQAGkBhXHj0pG+cIwgXbQkAN5jBEfU3CD21I3hjGoErire+VsCQeGhxZiEPUUpIc7CAbIxmINkDBBVIYhz18Q0zp7CMf4cCCqbSFACoAQhG49JsiAhH/hzecgZqsLB7n2FeGDHYTjbecpBHzVQg0vCEd4tpVaNqZGczwIxAnwGKLePAG03XwiJPgwxuy4AUyfiGHmsOmBA1ZhjjkQYgJnSTfSOeIOAyhC5FIED86RFHS4EMcVwQejKAgCDWKE3+PaAQg3kDN9rFvoK2sIBhamodCIJSIuYxaJQphBTTVYEjjaFhPSaOPRvhRqN15wRvqJ9NIOOKNkQjEG7xwhqdKMKoSzAJVA3GINM
img.draggable = false;
img.style.position = 'fixed';
img.style.bottom = '0';
img.style.right = '0';
img.style.width = '200px';
img.style.height = 'auto';
document.body.appendChild(img);
}
</script>
<script type="text/javascript">
"use strict";
const relayId = Math.floor(Math.random() * 3);
// %%%%%%%%% launch options %%%%%%%%%%%%
window.eaglercraftXOptsHints = {
hintsVersion: 1,
container: "game_frame",
worldsDB: "worlds",
relays: [
{ addr: "wss://relay.deev.is/", comment: "lax1dude relay #1", primary: relayId === 0 },
{ addr: "wss://relay.lax1dude.net/", comment: "lax1dude relay #2", primary: relayId === 1 },
{ addr: "wss://relay.shhnowisnottheti.me/", comment: "ayunami relay #1", primary: relayId === 2 }
],
checkRelaysForUpdates: true
};
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
</script>
<style type="eaglercraft" id="eaglercraftXClientSignature">data:application/octet-stream;base64,${client_signature}</style>
<style type="eaglercraft" id="eaglercraftXClientBundle">data:application/octet-stream;base64,${client_bundle}</style>
<script type="text/javascript">
"use strict";
(function(){
function eaglerBundleUnwrap(tagIn) { const e = document.getElementById(tagIn); const ret = e.innerText; e.remove(); return ret; }
window.eaglercraftXClientSignature = eaglerBundleUnwrap("eaglercraftXClientSignature");
window.eaglercraftXClientBundle = eaglerBundleUnwrap("eaglercraftXClientBundle");
})();
</script>
<script type="text/javascript">
"use strict";
(function(){
var ds = new DecompressionStream("gzip");
var result = [];
function fetchStream(reader) {
reader.read().then(function processData({ done, value }) {
if (done) {
window.clientScriptSrcURL = URL.createObjectURL(new Blob(result, { type: "text/javascript;charset=utf-8" }));
result = [];
ds = null;
return;
}
result.push(value);
return reader.read().then(processData);
});
}
fetch(window.eaglercraftXClientBundle, { cache: "force-cache" })
.then((response) => response.blob())
.then((blob) => fetchStream(blob.stream().pipeThrough(ds).getReader()));
})();
</script>
<script type="text/javascript">
"use strict";
(function(){
var launchInterval = -1;
var launchCounter = 1;
var launchCountdownNumberElement = null;
var launchCountdownProgressElement = null;
function launchTick() {
if(launchCounter > 100) {
if(window.clientScriptSrcURL) {
clearInterval(launchInterval);
setTimeout(() => {
document.getElementById("launch_countdown_screen").remove();
const script = document.createElement("script");
script.type = "text/javascript";
script.src = window.clientScriptSrcURL;
window.clientScriptSrcURL = null;
document.head.appendChild(script);
}, 50);
}
return;
}
launchCountdownNumberElement.innerText = "" + Math.floor(6.0 - launchCounter * 0.06);
launchCountdownProgressElement.style.width = "" + launchCounter + "%";
++launchCounter;
}
window.addEventListener("load", () => {
launchCountdownNumberElement = document.getElementById("launchCountdownNumber");
launchCountdownProgressElement = document.getElementById("launchCountdownProgress");
launchInterval = setInterval(launchTick, 50);
});
})();
</script>
<link type="image/png" rel="shortcut icon" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAAR/SURBVEhLtZXZK3ZRFMYPcqXc+gv413DHxVuGIpIhkciQWaRccCNjSCkligwXSOZ5nmfv9zvn2e8+58V753sudmuvvdZ61l5r7XOc8H+GS/D19aUNkPz5+aktQH5/f//4+LBKZKuRkpUtQjCUYG5gD2T38vLy/PwsDfL9/f3Dw8PT05M0b29vnKLhCKCBT4L4gvBLBIei4//4+Hh1dUVEQutUuLu7E83FxQUGnKLBWKfQaA3S+AREVxaEOD8/Pzk50XpzcyMDcH19zdZG3N3d3dzc3Nvb01aX5pQUpQGGQJxcQpfNysoKhUIdHR1o1tbWbInYAgxIPDMzMy8vLzc3FxqOdMoRqwJK8G8ALUYIhHMiSEhIwI6CyIb0qQzC4eGhsXCc1tZWnZIEKzdQJQSXgKxfX18RCM3Z5eWlcfVAxKOjo+Pj49PTU88lTOk2NjbMsePc3t6SAfcgFdszOyMuAdeBg0CQi2lhYUHOeOLDCisN8FzcPFZXV3t7ezHY3t5GQ+6it+2xMASsKhEEWKsmRLRBBUpPvpJ/TpFKFBwKYAiITmicsbYhdHfJAltqhUCVsCQhwslmeXmZxiBQT9c0Ar9E2O3v72sYSE0N1yQArkKy0kBMXLqlZqIZHR3t6empqqqSDcBdhXEJSJ/bUc3q6uq+vj629GB9fR1WsLW1NTs7u7S0RN2locMjIyOEm5ubQ7+4uJienk4/+vv77Y1hwhLBEKhwWHitdVFfX9/Y2Gg2HuLi4owUAysrK8yCG97rh0+ApP5Q2ZycHFlPTExUVFRIBvn5+WhKSkp2dnaMKhptbW2426GgQ/rwuAQCZ1hwFayLiork9hMFBQV1dXVmE0BLS4vqw3QFB8kn4IAxoGPkYpxi4FeDmpqas7Mz4pClAgqGwD48rjY2NmacYqC0tJQ1KSlJWyE5OZkpUKkBAxZVIntAoZh04+Q48fHxPNGBgYHExMT29naj9cBodnZ2mo3jlJWVMeW2OGQck4B1amqqoaGhqamJjx2lGxwcpL0mUgR8fJhsWqJtSkoKU2SbHHUDpkhPBujd8xuQG6PJRM/Pz09PT7O1NNnZ2Tw3fgZkXVhYKCUlUhBATP+hCVyKZGky17RV0g04laayslJ6hlVeFHB4eFhKaogGd0LxtmTgE+hbhKDnPjMzgw8E3qGL2tpaBWpubjYqj2BoaEj6rq4uNATRZ0ZwCbiL6gXEzINk5vCBQJ9rMD4+rkA8QNK036uDg4Py8vLu7m680KjIBNR3zBDoWQM1g98snyB+VSoRW8C/UwR81/SvhgNj9JOTkwwVERUdRBEI0BAdLRVERkhLS8vIyEDQlrsTPTU1lVFhKxARvZgUlFLbegCf4BvIsbi4mIg4E5EogIHhiKCMtU0WUFiVy06j5fAJIDdSBDQw+PegDfBRcbOPwH4F9LuFWIIQdQNKwWqzIE0aoFUaBsw+SQuFw0uNtC9A+F4i3QNrbg3IDn+SAsHh+wYiEpeyBEMLv/cAO6KzAijxxB+Y4wisBhssJUhjEbPJf4Nw+B+JXqLW3bw+wQAAAABJRU5ErkJggg==" />
</head>
<body style="margin:0px;width:100vw;height:100vh;overflow:hidden;" id="game_frame">
<div style="margin:0px;width:100%;height:100%;font-family:sans-serif;display:flex;align-items:center;user-select:none;" id="launch_countdown_screen">
<div style="margin:auto;text-align:center;">
<h1>This file is from <span style="color:#AA0000;">${date}</span></h1>
<h2>Game will launch in <span id="launchCountdownNumber">5</span>...</h2>
<div style="border:2px solid black;width:100%;height:15px;padding:1px;margin-bottom:20vh;"><div id="launchCountdownProgress" style="background-color:#555555;width:0%;height:100%;"></div></div>
</div>
</div>
</body>
</html>