fix eslint errors
authorLaurent Mazet <mazet@softndesign.org>
Thu, 13 Aug 2020 07:58:35 +0000 (09:58 +0200)
committerLaurent Mazet <mazet@softndesign.org>
Thu, 13 Aug 2020 07:58:35 +0000 (09:58 +0200)
public/trivabble.js

index 3fb5eb893ecf536155ab5eebf38bc78ebd138041..7159c6bb6b7a4ecf946fe17535562adb4e4bc01d 100644 (file)
     }
 
     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);
             };