1
0
mirror of https://github.com/zumbiepig/MineXLauncher.git synced 2025-06-26 10:05:10 +00:00

go to /play, remember last version

This commit is contained in:
zumbiepig
2024-09-03 09:39:40 -07:00
parent 7830ed53e5
commit 8503fd083f
7 changed files with 29 additions and 5 deletions

View File

@@ -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();
});

View File

@@ -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();
});

View File

@@ -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();
});

View File

@@ -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();
});

View File

@@ -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();
});

View File

@@ -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 {