Fix screenshot button now working after switching game

This commit is contained in:
redphx 2024-05-03 18:05:59 +07:00
parent d30efb2bed
commit 07a4034cc1

View File

@ -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 => {