mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-08-05 12:56:42 +02:00
Fix Settings button not showing on Header sometimes
This commit is contained in:
@@ -57,13 +57,12 @@ 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() {
|
||||||
@@ -71,7 +70,7 @@ export class HeaderSection {
|
|||||||
}
|
}
|
||||||
|
|
||||||
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