mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-08-06 05:08:26 +02:00
Fix Settings button not showing on Header sometimes
This commit is contained in:
@@ -57,21 +57,20 @@ export class HeaderSection {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static checkHeader() {
|
static checkHeader() {
|
||||||
if (!HeaderSection.#$buttonsWrapper.isConnected) {
|
|
||||||
let $target = document.querySelector('#PageContent div[class*=EdgewaterHeader-module__rightSectionSpacing]');
|
let $target = document.querySelector('#PageContent div[class*=EdgewaterHeader-module__rightSectionSpacing]');
|
||||||
if (!$target) {
|
if (!$target) {
|
||||||
$target = document.querySelector("div[class^=UnsupportedMarketPage-module__buttons]");
|
$target = document.querySelector("div[class^=UnsupportedMarketPage-module__buttons]");
|
||||||
}
|
}
|
||||||
|
|
||||||
$target && HeaderSection.#injectSettingsButton($target as HTMLElement);
|
$target && HeaderSection.#injectSettingsButton($target as HTMLElement);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
static showRemotePlayButton() {
|
static showRemotePlayButton() {
|
||||||
HeaderSection.#$remotePlayBtn.classList.remove('bx-gone');
|
HeaderSection.#$remotePlayBtn.classList.remove('bx-gone');
|
||||||
}
|
}
|
||||||
|
|
||||||
static watchHeader() {
|
static watchHeader() {
|
||||||
let $root = document.querySelector('#PageContent header') || document.querySelector('#root');
|
const $root = document.querySelector('#PageContent header') || document.querySelector('#root');
|
||||||
if (!$root) {
|
if (!$root) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user