mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-07 08:07:18 +02:00
Fix minor bugs in StreamMenu
This commit is contained in:
parent
28438c7c9e
commit
9e1d8866ce
@ -4524,7 +4524,7 @@ function injectStreamMenuButtons() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get the second last button
|
// Get the second last button
|
||||||
const $orgButton = node.querySelector('div > div > button:nth-last-child(2)');
|
const $orgButton = node.querySelector('div[class^=StreamMenu] > div > button:nth-last-child(2)');
|
||||||
if (!$orgButton) {
|
if (!$orgButton) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -4539,7 +4539,7 @@ function injectStreamMenuButtons() {
|
|||||||
$quickBar.setAttribute('data-clarity-boost', (msVideoProcessing && msVideoProcessing !== 'default'));
|
$quickBar.setAttribute('data-clarity-boost', (msVideoProcessing && msVideoProcessing !== 'default'));
|
||||||
|
|
||||||
// Close HUD
|
// Close HUD
|
||||||
$btnCloseHud.click();
|
$btnCloseHud && $btnCloseHud.click();
|
||||||
|
|
||||||
// Show Quick settings bar
|
// Show Quick settings bar
|
||||||
$quickBar.style.display = 'flex';
|
$quickBar.style.display = 'flex';
|
||||||
@ -4556,7 +4556,7 @@ function injectStreamMenuButtons() {
|
|||||||
|
|
||||||
// Hide Quick bar when closing HUD
|
// Hide Quick bar when closing HUD
|
||||||
const $btnCloseHud = document.querySelector('button[class*=StreamMenu-module__backButton]');
|
const $btnCloseHud = document.querySelector('button[class*=StreamMenu-module__backButton]');
|
||||||
$btnCloseHud.addEventListener('click', e => {
|
$btnCloseHud && $btnCloseHud.addEventListener('click', e => {
|
||||||
$quickBar.style.display = 'none';
|
$quickBar.style.display = 'none';
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -4567,7 +4567,7 @@ function injectStreamMenuButtons() {
|
|||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
|
|
||||||
// Close HUD
|
// Close HUD
|
||||||
$btnCloseHud.click();
|
$btnCloseHud && $btnCloseHud.click();
|
||||||
// Toggle Stream Stats
|
// Toggle Stream Stats
|
||||||
StreamStats.toggle();
|
StreamStats.toggle();
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user