diff --git a/app/js/preload/game.js b/app/js/preload/game.js index 1b44ddf..0182491 100644 --- a/app/js/preload/game.js +++ b/app/js/preload/game.js @@ -161,7 +161,7 @@ const injectExitBtn = () => { const initMenuTimer = () => { const instructions = document.getElementById('instructions'); const menuTimerText = ` - + `; instructions.insertAdjacentHTML('afterend', menuTimerText); @@ -208,7 +208,7 @@ ipcRenderer.on('didFinishLoad', () => { injectWaterMark(); initDiscordRPC(); if (isEnabledAltManager) injectAltManager(); - if (isEnabledTimer) initMenuTimer(); + initMenuTimer(); }); ipcRenderer.on('getLink', (e) => { diff --git a/app/js/util/settings.js b/app/js/util/settings.js index f172772..ca459e9 100644 --- a/app/js/util/settings.js +++ b/app/js/util/settings.js @@ -47,8 +47,9 @@ module.exports = { cat: 'General', type: 'checkbox', val: config.get('enableTimer', true), - restart: true, + restart: false, default: true, + onchange: 'window.gt.toggleDisplay("menuTimer")', }, autoPlay: { id: 'autoPlay', diff --git a/app/js/util/tools.js b/app/js/util/tools.js index 09349a4..7fb989f 100644 --- a/app/js/util/tools.js +++ b/app/js/util/tools.js @@ -429,4 +429,8 @@ exports.gameTools = class { break; } } + toggleDisplay(id) { + const el = document.getElementById(id); + el.style.display = el.style.display != 'none' ? 'none' : 'block'; + } }; \ No newline at end of file