mirror of
https://github.com/zumbiepig/MineXLauncher.git
synced 2025-06-08 08:24:50 +00:00
.
This commit is contained in:
parent
e3f4a1d40e
commit
c4c10917ee
@ -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') || [];
|
||||
|
Loading…
x
Reference in New Issue
Block a user