1
0
mirror of https://github.com/zumbiepig/MineXLauncher.git synced 2025-06-08 08:04:49 +00:00
This commit is contained in:
zumbiepig 2024-09-07 07:51:34 -07:00
parent 10ba4fc1ff
commit a074ce6135
No known key found for this signature in database
GPG Key ID: 17C891BE28B953DE
3 changed files with 12 additions and 12 deletions

View File

@ -81,7 +81,7 @@ if (!isDev) {
outputPath,
javascriptObfuscator
.obfuscate(readFileSync(outputPath, 'utf-8'), {
optionsPreset: 'high-obfuscation',
//optionsPreset: 'medium-obfuscation',
target: 'browser',
})
.getObfuscatedCode()

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);
}
},
},

View File

@ -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>