diff --git a/public/play/index.html b/public/play/index.html new file mode 100644 index 0000000..468fa5f --- /dev/null +++ b/public/play/index.html @@ -0,0 +1,22 @@ + +
+ + + diff --git a/src/resources/scripts/eagler-launch/1.5.2/main.ts b/src/resources/scripts/eagler-launch/1.5.2/main.ts index cac67f0..49b42e0 100644 --- a/src/resources/scripts/eagler-launch/1.5.2/main.ts +++ b/src/resources/scripts/eagler-launch/1.5.2/main.ts @@ -22,6 +22,6 @@ window.addEventListener('load', function () { const urlParams = new URLSearchParams(window.location.search); window.eaglercraftOpts.joinServer = urlParams.get('server') ?? undefined; - history.replaceState({}, '', '/'); + history.replaceState({}, '', '/play'); main(); }); diff --git a/src/resources/scripts/eagler-launch/1.8.8/eaglerforge.ts b/src/resources/scripts/eagler-launch/1.8.8/eaglerforge.ts index 0e82fcd..6ceeb4e 100644 --- a/src/resources/scripts/eagler-launch/1.8.8/eaglerforge.ts +++ b/src/resources/scripts/eagler-launch/1.8.8/eaglerforge.ts @@ -40,6 +40,6 @@ window.addEventListener('load', () => { window.eaglercraftXOpts.joinServer = urlParams.get('server') ?? undefined; window.eaglercraftXOpts.Mods = storage.local.get('mods') ?? []; - history.replaceState({}, '', '/'); + history.replaceState({}, '', '/play'); main(); }); diff --git a/src/resources/scripts/eagler-launch/1.8.8/main.ts b/src/resources/scripts/eagler-launch/1.8.8/main.ts index af9b4bf..13e6d29 100644 --- a/src/resources/scripts/eagler-launch/1.8.8/main.ts +++ b/src/resources/scripts/eagler-launch/1.8.8/main.ts @@ -21,6 +21,6 @@ window.addEventListener('load', () => { const urlParams = new URLSearchParams(window.location.search); window.eaglercraftXOpts.joinServer = urlParams.get('server') ?? undefined; - history.replaceState({}, '', '/'); + history.replaceState({}, '', '/play'); main(); }); diff --git a/src/resources/scripts/eagler-launch/1.9.4/main.ts b/src/resources/scripts/eagler-launch/1.9.4/main.ts index 7d4c331..3ef1ed2 100644 --- a/src/resources/scripts/eagler-launch/1.9.4/main.ts +++ b/src/resources/scripts/eagler-launch/1.9.4/main.ts @@ -16,6 +16,6 @@ window.addEventListener('load', () => { const urlParams = new URLSearchParams(window.location.search); window.eaglercraftXOpts.joinServer = urlParams.get('server') ?? undefined; - history.replaceState({}, '', '/'); + history.replaceState({}, '', '/play'); main(); }); diff --git a/src/resources/scripts/eagler-launch/b1.3/main.ts b/src/resources/scripts/eagler-launch/b1.3/main.ts index d21b3d9..7ab2b53 100644 --- a/src/resources/scripts/eagler-launch/b1.3/main.ts +++ b/src/resources/scripts/eagler-launch/b1.3/main.ts @@ -5,6 +5,6 @@ window.addEventListener('load', function () { const urlParams = new URLSearchParams(window.location.search); window.minecraftOpts.push(urlParams.get('server') ?? undefined); - history.replaceState({}, '', '/'); + history.replaceState({}, '', '/play'); main(); }); diff --git a/src/resources/scripts/main.ts b/src/resources/scripts/main.ts index 01f5fc2..58062fb 100644 --- a/src/resources/scripts/main.ts +++ b/src/resources/scripts/main.ts @@ -54,10 +54,12 @@ const game = { play: function (version?: string) { if (version) { document.body.style.display = 'none'; + storage.session.set('lastGame', version); // @ts-expect-error window.top.location.href = version; } else if (selectedVersion) { document.body.style.display = 'none'; + storage.session.set('lastPage', selectedVersion); // @ts-expect-error window.top.location.href = selectedVersion; } else {