1
0
mirror of https://github.com/zumbiepig/MineXLauncher.git synced 2025-06-08 09:24:48 +00:00

Rename username to launcher_username and reduce cookie expiration

This commit is contained in:
zumbiepig 2024-07-24 17:46:08 -07:00
parent 9c9c8196b3
commit ab9eb07444

View File

@ -5,7 +5,7 @@ document.addEventListener("DOMContentLoaded", function () {
const usernameInput = document.getElementById("username-input") as HTMLInputElement;
const profileName = document.getElementById("profile-name");
const savedUsername = cookie.get("launcherUsername");
const savedUsername = cookie.get("launcher_username");
if (profileName && savedUsername) {
profileName.textContent = savedUsername;
} else if (profileName && !savedUsername) {
@ -18,7 +18,7 @@ document.addEventListener("DOMContentLoaded", function () {
const username = usernameInput.value.trim();
if (username) {
profileName.textContent = username;
cookie.set("launcherUsername", username, 365);
cookie.set("launcher_username", username, 30);
}
});
}