From 18de97b29d7fdf394d5c3c89a25cf6b3f2753fd4 Mon Sep 17 00:00:00 2001 From: Laurent Mazet Date: Wed, 12 Aug 2020 22:10:51 +0200 Subject: [PATCH] correct eslint errors --- public/trivabble.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/public/trivabble.js b/public/trivabble.js index 5d0be42..88d62cf 100644 --- a/public/trivabble.js +++ b/public/trivabble.js @@ -1481,23 +1481,23 @@ 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() { @@ -1591,7 +1591,7 @@ doubleTapDuration.onchange = function () { localStorage.doubleTapDuration = document.getElementById("double-tap-duration").value; - } + }; } if (!Object.prototype.hasOwnProperty.call(localStorage, "flashLightDuration")) { @@ -1603,7 +1603,7 @@ flashLightDuration.onchange = function () { localStorage.flashLightDuration = document.getElementById("flash-light-duration").value; - } + }; } } @@ -1673,8 +1673,8 @@ } function showConfig() { - const modal = document.querySelector(".modal"); - modal.classList.toggle("show-modal"); + const modal = document.querySelector(".modal"); + modal.classList.toggle("show-modal"); } function initGlobals() { @@ -1701,8 +1701,8 @@ 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() { -- 2.30.2