diff --git a/script.js b/script.js index e1fe68120f..5c901ff017 100644 --- a/script.js +++ b/script.js @@ -13,11 +13,9 @@ $(document).ready(function() { mode = localStorage.getItem("beginnerMode") || "true"; } catch (error) { console.error("Error accessing localStorage:", error); - - mode = "true"; + mode = "true"; } - /** * The icon element that displays the user's current mode. * @type {HTMLElement} @@ -32,10 +30,10 @@ $(document).ready(function() { // Set the mode icon and tooltip based on the user's selected mode. if (mode === null || mode === "true") { - modeIcon.innerHTML = "star_border"; + modeIcon.textContent = "star_border"; // Use textContent for plain text modeText.setAttribute("data-tooltip", "Switch to advanced mode"); } else { - modeIcon.innerHTML = "star"; + modeIcon.textContent = "star"; // Use textContent for plain text modeText.setAttribute("data-tooltip", "Switch to beginner mode"); }