diff --git a/main.js b/main.js index d3ad749..2b7d4fb 100755 --- a/main.js +++ b/main.js @@ -1,6 +1,7 @@ const DEFAULT_USER = "defaultUser"; const DEFAULT_SESSION = "defaultSession"; const DEFAULT_WALLPAPPER = "defaultWallpapper"; +const WALLPAPPER_ELEMENT = "wallpappers"; function togglePasswordVisibility() { var passwd = document.getElementById("password"); @@ -19,7 +20,7 @@ function updateDefaults(user, session) { localStorage.setItem(DEFAULT_USER, user) localStorage.setItem(DEFAULT_SESSION, session) - var wallpapper = document.getElementById("wallpappers").value + var wallpapper = document.getElementById(WALLPAPPER_ELEMENT).value if(wallpapper) { localStorage.setItem(DEFAULT_WALLPAPPER, wallpapper) } @@ -106,7 +107,7 @@ function initGreeter() { select.appendChild(btn) } - const wallpappers = document.getElementById('wallpappers'); + const wallpappers = document.getElementById(WALLPAPPER_ELEMENT); wallpappers.addEventListener('change', (event) => { updateWallpapper(event.target.value);