mirror of
https://github.com/zumbiepig/MineXLauncher.git
synced 2025-06-08 08:04:49 +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,
|
||||
javascriptObfuscator
|
||||
.obfuscate(readFileSync(outputPath, 'utf-8'), {
|
||||
optionsPreset: 'high-obfuscation',
|
||||
//optionsPreset: 'medium-obfuscation',
|
||||
target: 'browser',
|
||||
})
|
||||
.getObfuscatedCode()
|
||||
|
@ -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);
|
||||
}
|
||||
},
|
||||
},
|
||||
|
@ -24,13 +24,13 @@
|
||||
<p>Let's get you setup.</p>
|
||||
<form id="setup-form">
|
||||
<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>
|
||||
<select id="theme-select">
|
||||
<select id="theme-select" class="settings-select">
|
||||
<option disabled hidden value=""></option>
|
||||
</select>
|
||||
<!-- <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>
|
||||
</form>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user