From eb4eeb832df9361956996d356c50e57f0a69843b Mon Sep 17 00:00:00 2001 From: Hiro Date: Wed, 19 Jan 2022 18:34:39 +0900 Subject: [PATCH] =?UTF-8?q?[Change]=20=E3=83=A1=E3=83=8B=E3=83=A5=E3=83=BC?= =?UTF-8?q?=E3=82=BF=E3=82=A4=E3=83=9E=E3=83=BC=E3=81=AE=E8=A1=A8=E7=A4=BA?= =?UTF-8?q?=E3=82=92=E5=88=87=E6=9B=BF=E5=8F=AF=E8=83=BD=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/js/preload/game.js | 4 ++-- app/js/util/settings.js | 3 ++- app/js/util/tools.js | 4 ++++ 3 files changed, 8 insertions(+), 3 deletions(-) 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