From 4d1a4ab4c841d1009d5c476cb965813ffd35437a Mon Sep 17 00:00:00 2001 From: Laurent Mazet Date: Thu, 13 Aug 2020 09:58:35 +0200 Subject: [PATCH] fix eslint errors --- public/trivabble.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/public/trivabble.js b/public/trivabble.js index 3fb5eb8..7159c6b 100644 --- a/public/trivabble.js +++ b/public/trivabble.js @@ -1444,7 +1444,7 @@ } function highlightTile(e) { - const id = this.id; + let id = this.id; if (id === "") { return; } else if (id === "center-cell") { @@ -1589,7 +1589,7 @@ } 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; @@ -1601,7 +1601,7 @@ } 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; @@ -1617,7 +1617,7 @@ 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); }; -- 2.30.2