1
0
mirror of https://github.com/zumbiepig/MineXLauncher.git synced 2025-06-08 08:24:50 +00:00
This commit is contained in:
zumbiepig 2024-08-31 09:03:27 -07:00
parent e3f4a1d40e
commit c4c10917ee
No known key found for this signature in database
GPG Key ID: 17C891BE28B953DE

View File

@ -16,6 +16,24 @@ window.addEventListener('load', () => {
],
};
const storage = {
local: {
get: function (key: string) {
const item = localStorage.getItem('minexlauncher');
if (item !== null) {
const json = JSON.parse(item);
if (json[key] !== undefined) {
return json[key];
} else {
return null;
}
} else {
return null;
}
},
},
};
const urlParams = new URLSearchParams(window.location.search);
window.eaglercraftXOpts.joinServer = urlParams.get('server') ?? undefined;
window.eaglercraftXOpts.Mods = storage.local.get('mods') || [];