Update better-xcloud.user.js

This commit is contained in:
redphx 2024-09-02 21:18:32 +07:00 committed by GitHub
parent e0489d30bb
commit adf6b05c10
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2266,7 +2266,7 @@ class NativeMkbHandler extends MkbHandler {
#onPollingModeChanged = (e) => { #onPollingModeChanged = (e) => {
if (!this.#$message) if (!this.#$message)
return; return;
if (e.mode === "None") if (e.mode === "none")
this.#$message.classList.remove("bx-offscreen"); this.#$message.classList.remove("bx-offscreen");
else else
this.#$message.classList.add("bx-offscreen"); this.#$message.classList.add("bx-offscreen");
@ -3961,7 +3961,7 @@ e.guideUI = null;
if (!str.includes(".setPollingMode=e=>{")) if (!str.includes(".setPollingMode=e=>{"))
return !1; return !1;
const newCode = ` const newCode = `
BxEvent.dispatch(window, BxEvent.XCLOUD_POLLING_MODE_CHANGED, {mode: e}); BxEvent.dispatch(window, BxEvent.XCLOUD_POLLING_MODE_CHANGED, {mode: e.toLowerCase()});
`; `;
return str = str.replace(".setPollingMode=e=>{", ".setPollingMode=e=>{" + newCode), str; return str = str.replace(".setPollingMode=e=>{", ".setPollingMode=e=>{" + newCode), str;
}, },
@ -5625,7 +5625,7 @@ class EmulatedMkbHandler extends MkbHandler {
#onPollingModeChanged = (e) => { #onPollingModeChanged = (e) => {
if (!this.#$message) if (!this.#$message)
return; return;
if (e.mode === "None") if (e.mode === "none")
this.#$message.classList.remove("bx-offscreen"); this.#$message.classList.remove("bx-offscreen");
else else
this.#$message.classList.add("bx-offscreen"); this.#$message.classList.add("bx-offscreen");
@ -7686,9 +7686,7 @@ class MicrophoneAction extends BaseGameBarAction {
class TrueAchievements { class TrueAchievements {
static open() { static open() {
if (AppInterface) {
;
else {
let xboxTitleId; let xboxTitleId;
xboxTitleId = STATES.currentStream.xboxTitleId || STATES.currentStream.titleInfo?.details.xboxTitleId; xboxTitleId = STATES.currentStream.xboxTitleId || STATES.currentStream.titleInfo?.details.xboxTitleId;
let url = "https://www.trueachievements.com"; let url = "https://www.trueachievements.com";
@ -7759,7 +7757,7 @@ class GameBar {
this.disable(); this.disable();
return; return;
} }
e.mode !== "None" ? this.disable() : this.enable(); e.mode !== "none" ? this.disable() : this.enable();
}).bind(this)); }).bind(this));
} }
beginHideTimeout() { beginHideTimeout() {