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, 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()

View File

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

View File

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