clean default configuration

This commit is contained in:
Laurent Mazet 2021-04-20 08:31:22 +02:00
parent 3a148fbbd1
commit b010c4c43e
2 changed files with 30 additions and 20 deletions

View File

@ -3,49 +3,58 @@
window.TrivabbleConf = { window.TrivabbleConf = {
// The amount of time to wait after a connection failure // The amount of time to wait after a connection failure
POLLING_DELAY: 2000, //POLLING_DELAY: 2000,
// Whether WebSockets should be used, if possible // Whether WebSockets should be used, if possible
ENABLE_WEBSOCKETS: true, //ENABLE_WEBSOCKETS: true,
// Whether Server Sent Events should be used, if available // Whether Server Sent Events should be used, if available
ENABLE_EVENT_SOURCE: true, //ENABLE_EVENT_SOURCE: true,
// Max consecutive tries before blacklisting WebSockets for the current session // Max consecutive tries before blacklisting WebSockets for the current session
MAX_WEBSOCKET_ERRORS: 1, //MAX_WEBSOCKET_ERRORS: 1,
// To tweak only if your webserver is shared with other conflicting resources at / (e.g. Yunohost integration) // To tweak only if your webserver is shared with other conflicting resources at / (e.g. Yunohost integration)
APP_PATH: "", //APP_PATH: "",
// The API entry point. Default value: APP_PATH + '/:trivabble' // The API entry point. Default value: APP_PATH + '/:trivabble'
API_ENTRY_POINT: "/:trivabble", //API_ENTRY_POINT: "/:trivabble",
// The color of the flash light when double clicking on a cell // Wether sounds should be played when receiving messages
FLASH_LIGHT_COLOR: "#EE6633", //ENABLE_MSG_SOUND: true,
// The list of durations of the flash light available in the settings box // Wether sounds should be played when moving tiles
FLASH_LIGHT_DURATIONS: [800, 1600, 3200], //ENABLE_TILE_SOUND: true,
// The defaut flash light duration. If not set, the value at the middle of the previous array is used. // Spell checker activation
FLASH_LIGHT_DURATION: 1600, //ENABLE_SPELL_CHECKER: false,
// The list of durations used to detect a double tap available in the settings box // The list of durations used to detect a double tap available in the settings box
DOUBLE_TAP_DURATIONS: [650, 1100, 1800, 3000, 5000], //DOUBLE_TAP_DURATIONS: [650, 1100, 1800, 3000, 5000],
// The defaut double tap duration. If not set, the value at the middle of the previous array is used. // The defaut double tap duration. If not set, the value at the middle of the previous array is used.
DOUBLE_TAP_DURATION: 1800, //DOUBLE_TAP_DURATION: 1800,
// The color of the flash light when double clicking on a cell
//FLASH_LIGHT_COLOR: "#EE6633",
// The list of durations of the flash light available in the settings box
//FLASH_LIGHT_DURATIONS: [800, 1600, 3200],
// The defaut flash light duration. If not set, the value at the middle of the previous array is used.
//FLASH_LIGHT_DURATION: 1600,
// The default premium for playing seven tiles on a turn // The default premium for playing seven tiles on a turn
PREMIUM_SEVEN_TILES: 50, //PREMIUM_SEVEN_TILES: 50,
// Score is automically affected to last player. If false, score is automatically affected to the player who pressed the Score button // 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, //SCORE_LAST_PLAYER: true,
// Timer activation // Timer activation
ENABLE_TIMER: false, //ENABLE_TIMER: false,
// Cell captions. Could be "clip", "dots", "none" or "short" // Cell captions. Could be "clip", "dots", "none" or "short"
CELL_CAPTIONS: "dots", //CELL_CAPTIONS: "dots",
// I don't like trailing commas, here is a nice message for you reading this file :-) // I don't like trailing commas, here is a nice message for you reading this file :-)
HAVE_FUN: true HAVE_FUN: true

View File

@ -52,14 +52,15 @@
setConf("ENABLE_EVENT_SOURCE", true); setConf("ENABLE_EVENT_SOURCE", true);
setConf("MAX_WEBSOCKET_ERRORS", 1); setConf("MAX_WEBSOCKET_ERRORS", 1);
setConf("APP_PATH", ""); setConf("APP_PATH", "");
setConf("API_ENTRY_POINT", Conf.APP_PATH + "/:trivabble");
setConf("ENABLE_MSG_SOUND", true); setConf("ENABLE_MSG_SOUND", true);
setConf("ENABLE_TILE_SOUND", true); setConf("ENABLE_TILE_SOUND", true);
setConf("ENABLE_SPELL_CHECKER", false);
setConf("DOUBLE_TAP_DURATIONS", [650, 1100, 1800, 3000, 5000]); setConf("DOUBLE_TAP_DURATIONS", [650, 1100, 1800, 3000, 5000]);
setConf("DOUBLE_TAP_DURATION", middle("DOUBLE_TAP_DURATIONS")); setConf("DOUBLE_TAP_DURATION", middle("DOUBLE_TAP_DURATIONS"));
setConf("FLASH_LIGHT_COLOR", "#ee6633");
setConf("FLASH_LIGHT_DURATIONS", [800, 1600, 3200]); setConf("FLASH_LIGHT_DURATIONS", [800, 1600, 3200]);
setConf("FLASH_LIGHT_DURATION", middle("FLASH_LIGHT_DURATIONS")); setConf("FLASH_LIGHT_DURATION", middle("FLASH_LIGHT_DURATIONS"));
setConf("FLASH_LIGHT_COLOR", "#ee6633");
setConf("API_ENTRY_POINT", Conf.APP_PATH + "/:trivabble");
setConf("PREMIUM_SEVEN_TILES", 50); setConf("PREMIUM_SEVEN_TILES", 50);
setConf("SCORE_LAST_PLAYER", true); setConf("SCORE_LAST_PLAYER", true);
setConf("ENABLE_TIMER", false); setConf("ENABLE_TIMER", false);