From 07a4034cc1a1ef796f8fe397a0fcf7b0fbdc1f4c Mon Sep 17 00:00:00 2001 From: redphx <96280+redphx@users.noreply.github.com> Date: Fri, 3 May 2024 18:05:59 +0700 Subject: [PATCH] Fix screenshot button now working after switching game --- src/index.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/index.ts b/src/index.ts index bdfa029..09396fe 100644 --- a/src/index.ts +++ b/src/index.ts @@ -162,6 +162,7 @@ window.addEventListener(BxEvent.STREAM_PLAYING, e => { // Setup screenshot button if (PREF_SCREENSHOT_BUTTON_POSITION !== 'none') { const $btn = document.querySelector('.bx-screenshot-button')! as HTMLElement; + $btn.classList.remove('bx-gone'); $btn.style.display = 'block'; if (PREF_SCREENSHOT_BUTTON_POSITION === 'bottom-right') { @@ -170,6 +171,9 @@ window.addEventListener(BxEvent.STREAM_PLAYING, e => { $btn.style.left = '0'; } } + + const $touchControllerBar = document.getElementById('bx-touch-controller-bar'); + $touchControllerBar && $touchControllerBar.classList.remove('bx-gone'); }); window.addEventListener(BxEvent.STREAM_ERROR_PAGE, e => {