correct eslint errors
authorLaurent Mazet <mazet@softndesign.org>
Wed, 12 Aug 2020 20:10:51 +0000 (22:10 +0200)
committerLaurent Mazet <mazet@softndesign.org>
Wed, 12 Aug 2020 20:10:51 +0000 (22:10 +0200)
public/trivabble.js

index 5d0be42a6c8fdfad4b2e75ac82e450357b37e36a..88d62cffb0ca0166c5b63a59d81e334b3345e6b1 100644 (file)
         setTimeout(
             function (x) {
                 x.classList.remove("highlight");
-            }, localStorage.flashLightDuration*1/3, placeholder);
+            }, Number(localStorage.flashLightDuration) * 1 / 3, placeholder);
         setTimeout(
             function (x) {
                 x.classList.add("highlight");
-            }, localStorage.flashLightDuration*1/2, placeholder);
+            }, Number(localStorage.flashLightDuration) * 1 / 2, placeholder);
         setTimeout(
             function (x) {
                 x.classList.remove("highlight");
-            }, localStorage.flashLightDuration*2/3, placeholder);
+            }, Number(localStorage.flashLightDuration) * 2 / 3, placeholder);
         setTimeout(
             function (x) {
                 x.classList.add("highlight");
-            }, localStorage.flashLightDuration*5/6, placeholder);
+            }, Number(localStorage.flashLightDuration) * 5 / 6, placeholder);
         setTimeout(
             function (x) {
                 x.classList.remove("highlight");
-            }, localStorage.flashLightDuration*1, placeholder);
+            }, Number(localStorage.flashLightDuration) * 1, placeholder);
     }
 
     function initChat() {
             doubleTapDuration.onchange = function () {
                 localStorage.doubleTapDuration =
                     document.getElementById("double-tap-duration").value;
-            }
+            };
         }
 
         if (!Object.prototype.hasOwnProperty.call(localStorage, "flashLightDuration")) {
             flashLightDuration.onchange = function () {
                 localStorage.flashLightDuration =
                     document.getElementById("flash-light-duration").value;
-            }
+            };
         }
     }
 
     }
 
     function showConfig() {
-       const modal = document.querySelector(".modal");
-       modal.classList.toggle("show-modal");
+        const modal = document.querySelector(".modal");
+        modal.classList.toggle("show-modal");
     }
 
     function initGlobals() {
         document.getElementById("show-rack").onclick   = showRack;
         helpClear.onclick  = clearGame;
 
-       document.getElementById("modal-config-btn").onclick = showConfig;
-       document.getElementById("modal-close-btn").onclick = showConfig;
+        document.getElementById("modal-config-btn").onclick = showConfig;
+        document.getElementById("modal-close-btn").onclick = showConfig;
     }
 
     function initGame() {