Skip to content

Commit

Permalink
disable localstorage shadow for firefox
Browse files Browse the repository at this point in the history
  • Loading branch information
syxanash committed Dec 26, 2024
1 parent b06a2bb commit 55fa483
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions assets/js/bluerain.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@ if (Util.isMobile()) {
}

let showEmojis = true;
let showTextShadow = localStorage.getItem("showTextShadow") === null ? false : JSON.parse(localStorage.getItem("showTextShadow"));
let showTextShadow = localStorage.getItem("showTextShadow") === null || Util.isFirefox()
? false
: JSON.parse(localStorage.getItem("showTextShadow"));

const canvas = document.querySelector("canvas"),
ctx = canvas.getContext("2d");
Expand Down Expand Up @@ -398,10 +400,11 @@ toggleSoundButton.addEventListener('click', toggleSound);
toggleTextShadowButton.addEventListener("click", () => {
showTextShadow = !showTextShadow;

localStorage.setItem("showTextShadow", showTextShadow);
if (!Util.isFirefox())
localStorage.setItem("showTextShadow", showTextShadow);

playActionSound(pressingSound);

toggleTextShadowButton.innerText = showTextShadow ? "Disable Text Shadow" : "Enable Text Shadow";
toggleActiveButton(toggleTextShadowButton, showTextShadow);
});
Expand Down

0 comments on commit 55fa483

Please sign in to comment.