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() {