1
0
mirror of https://github.com/zumbiepig/MineXLauncher.git synced 2025-06-26 10:05:10 +00:00
This commit is contained in:
zumbiepig
2024-09-07 07:51:34 -07:00
parent 5d939b1553
commit 2e4e1685c4
3 changed files with 12 additions and 12 deletions

View File

@@ -224,8 +224,8 @@ const storage = {
get: function (key: string) {
const item = localStorage.getItem('minexlauncher');
if (item !== null) {
const decoded = atob(item);
const json = JSON.parse(decoded);
//const decoded = atob(item);
const json = JSON.parse(item);
if (json[key] !== undefined) {
return json[key];
}
@@ -239,15 +239,15 @@ const storage = {
const json: Record<string, unknown> = {};
json[key] = value;
const string = JSON.stringify(json);
const encoded = btoa(string);
localStorage.setItem('minexlauncher', encoded);
//const encoded = btoa(string);
localStorage.setItem('minexlauncher', string);
} else {
const decoded = atob(item);
const json = JSON.parse(decoded);
//const decoded = atob(item);
const json = JSON.parse(item);
json[key] = value;
const string = JSON.stringify(json);
const encoded = btoa(string);
localStorage.setItem('minexlauncher', encoded);
//const encoded = btoa(string);
localStorage.setItem('minexlauncher', string);
}
},
},