disactivate timers by default
authorLaurent Mazet <mazet@softndesign.org>
Tue, 8 Dec 2020 20:37:47 +0000 (21:37 +0100)
committerLaurent Mazet <mazet@softndesign.org>
Tue, 8 Dec 2020 20:37:47 +0000 (21:37 +0100)
public/config.js.sample
public/trivabble.js

index 6d36aaa0535c07fa5dbfe50fa39321d70181d48d..59619b9bee332367d76d9cc99c740929c5ebfb04 100644 (file)
@@ -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
 };
index 1d8259995f4fda38925f5f5fefe810b9ab4c2d98..7dcab5c5c1cdc685d78d6de4a4b732f4b66882d0 100644 (file)
     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) {
     }
 
     function setTimerState(state) {
+        setSetting("TimerEnable", state);
         if (state) {
             document.getElementById("timer").style.display = "block";
             document.getElementById("enable-timer").checked = true;