mirror of
https://github.com/zumbiepig/MineXLauncher.git
synced 2025-06-08 09:24:48 +00:00
fix
This commit is contained in:
parent
10ba4fc1ff
commit
a074ce6135
2
build.ts
2
build.ts
@ -81,7 +81,7 @@ if (!isDev) {
|
|||||||
outputPath,
|
outputPath,
|
||||||
javascriptObfuscator
|
javascriptObfuscator
|
||||||
.obfuscate(readFileSync(outputPath, 'utf-8'), {
|
.obfuscate(readFileSync(outputPath, 'utf-8'), {
|
||||||
optionsPreset: 'high-obfuscation',
|
//optionsPreset: 'medium-obfuscation',
|
||||||
target: 'browser',
|
target: 'browser',
|
||||||
})
|
})
|
||||||
.getObfuscatedCode()
|
.getObfuscatedCode()
|
||||||
|
@ -224,8 +224,8 @@ const storage = {
|
|||||||
get: function (key: string) {
|
get: function (key: string) {
|
||||||
const item = localStorage.getItem('minexlauncher');
|
const item = localStorage.getItem('minexlauncher');
|
||||||
if (item !== null) {
|
if (item !== null) {
|
||||||
const decoded = atob(item);
|
//const decoded = atob(item);
|
||||||
const json = JSON.parse(decoded);
|
const json = JSON.parse(item);
|
||||||
if (json[key] !== undefined) {
|
if (json[key] !== undefined) {
|
||||||
return json[key];
|
return json[key];
|
||||||
}
|
}
|
||||||
@ -239,15 +239,15 @@ const storage = {
|
|||||||
const json: Record<string, unknown> = {};
|
const json: Record<string, unknown> = {};
|
||||||
json[key] = value;
|
json[key] = value;
|
||||||
const string = JSON.stringify(json);
|
const string = JSON.stringify(json);
|
||||||
const encoded = btoa(string);
|
//const encoded = btoa(string);
|
||||||
localStorage.setItem('minexlauncher', encoded);
|
localStorage.setItem('minexlauncher', string);
|
||||||
} else {
|
} else {
|
||||||
const decoded = atob(item);
|
//const decoded = atob(item);
|
||||||
const json = JSON.parse(decoded);
|
const json = JSON.parse(item);
|
||||||
json[key] = value;
|
json[key] = value;
|
||||||
const string = JSON.stringify(json);
|
const string = JSON.stringify(json);
|
||||||
const encoded = btoa(string);
|
//const encoded = btoa(string);
|
||||||
localStorage.setItem('minexlauncher', encoded);
|
localStorage.setItem('minexlauncher', string);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -24,13 +24,13 @@
|
|||||||
<p>Let's get you setup.</p>
|
<p>Let's get you setup.</p>
|
||||||
<form id="setup-form">
|
<form id="setup-form">
|
||||||
<label for="username-input">Username:</label>
|
<label for="username-input">Username:</label>
|
||||||
<input id="username-input" placeholder="Enter username" />
|
<input id="username-input" class="settings-input" placeholder="Enter username" />
|
||||||
<label for="theme-select">Theme:</label>
|
<label for="theme-select">Theme:</label>
|
||||||
<select id="theme-select">
|
<select id="theme-select" class="settings-select">
|
||||||
<option disabled hidden value=""></option>
|
<option disabled hidden value=""></option>
|
||||||
</select>
|
</select>
|
||||||
<!-- <label for="offline-checkbox">Enable offline use:</label>
|
<!-- <label for="offline-checkbox">Enable offline use:</label>
|
||||||
<input type="checkbox" id="offline-checkbox" /> -->
|
<input type="checkbox" id="offline-checkbox" class="settings-checkbox" /> -->
|
||||||
<button type="submit" class="setup-submit">Submit</button>
|
<button type="submit" class="setup-submit">Submit</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user