Skip to content

Commit

Permalink
script.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Sarvesh2783 authored Dec 27, 2024
1 parent e731ba9 commit 8a7b30f
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand All @@ -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");
}

Expand Down

0 comments on commit 8a7b30f

Please sign in to comment.