mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-04 22:57:19 +02:00
Fix Settings dialog opening during gameplay
This commit is contained in:
parent
086afafedf
commit
98cf893956
4
dist/better-xcloud.user.js
vendored
4
dist/better-xcloud.user.js
vendored
@ -7656,8 +7656,8 @@ window.addEventListener("popstate", onHistoryChanged);
|
||||
window.history.pushState = patchHistoryMethod("pushState");
|
||||
window.history.replaceState = patchHistoryMethod("replaceState");
|
||||
window.addEventListener(BxEvent.XCLOUD_SERVERS_UNAVAILABLE, (e) => {
|
||||
STATES.supportedRegion = !1, window.setTimeout(HeaderSection.watchHeader, 2000), SettingsNavigationDialog.getInstance().show();
|
||||
});
|
||||
if (STATES.supportedRegion = !1, window.setTimeout(HeaderSection.watchHeader, 2000), document.querySelector("div[class^=UnsupportedMarketPage-module__container]")) SettingsNavigationDialog.getInstance().show();
|
||||
}, { once: !0 });
|
||||
window.addEventListener(BxEvent.XCLOUD_SERVERS_READY, (e) => {
|
||||
STATES.isSignedIn = !0, window.setTimeout(HeaderSection.watchHeader, 2000);
|
||||
});
|
||||
|
@ -192,8 +192,11 @@ window.addEventListener(BxEvent.XCLOUD_SERVERS_UNAVAILABLE, e => {
|
||||
window.setTimeout(HeaderSection.watchHeader, 2000);
|
||||
|
||||
// Open Settings dialog on Unsupported page
|
||||
SettingsNavigationDialog.getInstance().show();
|
||||
});
|
||||
const $unsupportedPage = document.querySelector('div[class^=UnsupportedMarketPage-module__container]') as HTMLElement;
|
||||
if ($unsupportedPage) {
|
||||
SettingsNavigationDialog.getInstance().show();
|
||||
}
|
||||
}, {once: true});
|
||||
|
||||
window.addEventListener(BxEvent.XCLOUD_SERVERS_READY, e => {
|
||||
STATES.isSignedIn = true;
|
||||
|
@ -63,7 +63,7 @@ export class HeaderSection {
|
||||
static checkHeader() {
|
||||
let $target = document.querySelector('#PageContent div[class*=EdgewaterHeader-module__rightSectionSpacing]');
|
||||
if (!$target) {
|
||||
$target = document.querySelector("div[class^=UnsupportedMarketPage-module__buttons]");
|
||||
$target = document.querySelector('div[class^=UnsupportedMarketPage-module__buttons]');
|
||||
}
|
||||
|
||||
$target && HeaderSection.#injectSettingsButton($target as HTMLElement);
|
||||
|
Loading…
x
Reference in New Issue
Block a user