}
function highlightTile(e) {
- const id = this.id;
+ let id = this.id;
if (id === "") {
return;
} else if (id === "center-cell") {
}
const doubleTapDuration = document.getElementById("double-tap-duration");
if (doubleTapDuration) {
- doubleTapDuration.value = localStorage.doubleTapDuration;
+ doubleTapDuration.value = Number(localStorage.doubleTapDuration);
doubleTapDuration.onchange = function () {
localStorage.doubleTapDuration =
document.getElementById("double-tap-duration").value;
}
const flashLightDuration = document.getElementById("flash-light-duration");
if (flashLightDuration) {
- flashLightDuration.value = localStorage.flashLightDuration;
+ flashLightDuration.value = Number(localStorage.flashLightDuration);
flashLightDuration.onchange = function () {
localStorage.flashLightDuration =
document.getElementById("flash-light-duration").value;
flashLightColor.onchange = function () {
localStorage.flashLightColor =
document.getElementById("flash-light-color").value;
- var style = document.createElement('style')
+ const style = document.createElement("style");
style.innerHTML = ".highlight {background-color: " + localStorage.flashLightColor + ";}";
document.body.appendChild(style);
};