From 8f9ed16bcee505a76aca7e3e269d7df86f51268f Mon Sep 17 00:00:00 2001 From: Laurent Mazet Date: Tue, 8 Dec 2020 21:37:47 +0100 Subject: [PATCH] disactivate timers by default --- public/config.js.sample | 3 +++ public/trivabble.js | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/public/config.js.sample b/public/config.js.sample index 6d36aaa..59619b9 100644 --- a/public/config.js.sample +++ b/public/config.js.sample @@ -41,6 +41,9 @@ window.TrivabbleConf = { // Score is automically affected to last player. If false, score is automatically affected to the player who pressed the Score button SCORE_LAST_PLAYER: true, + // Timer activation + ENABLE_TIMER: false, + // I don't like trailing commas, here is a nice message for you reading this file :-) HAVE_FUN: true }; diff --git a/public/trivabble.js b/public/trivabble.js index 1d82599..7dcab5c 100644 --- a/public/trivabble.js +++ b/public/trivabble.js @@ -62,11 +62,11 @@ setConf("API_ENTRY_POINT", Conf.APP_PATH + "/:trivabble"); setConf("PREMIUM_SEVEN_TILES", 50); setConf("SCORE_LAST_PLAYER", true); - setConf("ENABLE_TIMER", true); + setConf("ENABLE_TIMER", false); function isSetting(key) { return Object.prototype.hasOwnProperty.call(Conf, key) || - Object.prototype.hasOwnProperty.call(localStorage, key); + Object.prototype.hasOwnProperty.call(localStorage, "trivabble" + key); } function getSetting(key) { @@ -2262,6 +2262,7 @@ } function setTimerState(state) { + setSetting("TimerEnable", state); if (state) { document.getElementById("timer").style.display = "block"; document.getElementById("enable-timer").checked = true; -- 2.30.2