mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-06 15:47:18 +02:00
Lite: remove LocalCoOpManager
This commit is contained in:
parent
b6d4c51ca9
commit
a2f062d9d5
21
dist/better-xcloud.lite.user.js
vendored
21
dist/better-xcloud.lite.user.js
vendored
@ -5039,19 +5039,6 @@ if (blockFeatures.includes("chat")) FeatureGates.EnableGuideChatTab = !1;
|
|||||||
if (blockFeatures.includes("friends")) FeatureGates.EnableFriendsAndFollowers = !1;
|
if (blockFeatures.includes("friends")) FeatureGates.EnableFriendsAndFollowers = !1;
|
||||||
if (blockFeatures.includes("byog")) FeatureGates.EnableBYOG = !1, FeatureGates.EnableBYOGPurchase = !1;
|
if (blockFeatures.includes("byog")) FeatureGates.EnableBYOG = !1, FeatureGates.EnableBYOGPurchase = !1;
|
||||||
if (BX_FLAGS.FeatureGates) FeatureGates = Object.assign(BX_FLAGS.FeatureGates, FeatureGates);
|
if (BX_FLAGS.FeatureGates) FeatureGates = Object.assign(BX_FLAGS.FeatureGates, FeatureGates);
|
||||||
class LocalCoOpManager {
|
|
||||||
static instance;
|
|
||||||
static getInstance = () => LocalCoOpManager.instance ?? (LocalCoOpManager.instance = new LocalCoOpManager);
|
|
||||||
supportedIds;
|
|
||||||
constructor() {
|
|
||||||
BxEventBus.Script.once("list.localCoOp.updated", (e) => {
|
|
||||||
this.supportedIds = e.ids;
|
|
||||||
}), this.supportedIds = GhPagesUtils.getLocalCoOpList(), console.log("this.supportedIds", this.supportedIds);
|
|
||||||
}
|
|
||||||
isSupported(productId) {
|
|
||||||
return this.supportedIds.has(productId);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
var BxExposed = {
|
var BxExposed = {
|
||||||
getTitleInfo: () => STATES.currentStream.titleInfo,
|
getTitleInfo: () => STATES.currentStream.titleInfo,
|
||||||
modifyPreloadedState: !1,
|
modifyPreloadedState: !1,
|
||||||
@ -5098,7 +5085,7 @@ var BxExposed = {
|
|||||||
],
|
],
|
||||||
toggleLocalCoOp(enable) {},
|
toggleLocalCoOp(enable) {},
|
||||||
beforePageLoad: () => {},
|
beforePageLoad: () => {},
|
||||||
localCoOpManager: LocalCoOpManager.getInstance(),
|
localCoOpManager: null,
|
||||||
reactCreateElement: function(...args) {},
|
reactCreateElement: function(...args) {},
|
||||||
createReactLocalCoOpIcon: () => {}
|
createReactLocalCoOpIcon: () => {}
|
||||||
};
|
};
|
||||||
@ -6534,11 +6521,7 @@ window.addEventListener("pagehide", (e) => {
|
|||||||
BxEventBus.Stream.emit("state.stopped", {});
|
BxEventBus.Stream.emit("state.stopped", {});
|
||||||
});
|
});
|
||||||
function main() {
|
function main() {
|
||||||
if (GhPagesUtils.fetchLatestCommit(), getPref("nativeMkb.mode") !== "off") {
|
if (GhPagesUtils.fetchLatestCommit(), StreamSettings.setup(), patchRtcPeerConnection(), patchRtcCodecs(), interceptHttpRequests(), patchVideoApi(), patchCanvasContext(), getPref("audio.volume.booster.enabled") && patchAudioContext(), getPref("block.tracking")) patchMeControl(), disableAdobeAudienceManager();
|
||||||
let customList = getPref("nativeMkb.forcedGames");
|
|
||||||
BX_FLAGS.ForceNativeMkbTitles.push(...customList);
|
|
||||||
}
|
|
||||||
if (StreamSettings.setup(), patchRtcPeerConnection(), patchRtcCodecs(), interceptHttpRequests(), patchVideoApi(), patchCanvasContext(), getPref("audio.volume.booster.enabled") && patchAudioContext(), getPref("block.tracking")) patchMeControl(), disableAdobeAudienceManager();
|
|
||||||
if (RootDialogObserver.waitForRootDialog(), addCss(), GuideMenu.getInstance().addEventListeners(), StreamStatsCollector.setupEvents(), StreamBadges.setupEvents(), StreamStats.setupEvents(), getPref("ui.controllerStatus.show")) window.addEventListener("gamepadconnected", (e) => showGamepadToast(e.gamepad)), window.addEventListener("gamepaddisconnected", (e) => showGamepadToast(e.gamepad));
|
if (RootDialogObserver.waitForRootDialog(), addCss(), GuideMenu.getInstance().addEventListeners(), StreamStatsCollector.setupEvents(), StreamBadges.setupEvents(), StreamStats.setupEvents(), getPref("ui.controllerStatus.show")) window.addEventListener("gamepadconnected", (e) => showGamepadToast(e.gamepad)), window.addEventListener("gamepaddisconnected", (e) => showGamepadToast(e.gamepad));
|
||||||
}
|
}
|
||||||
main();
|
main();
|
||||||
|
@ -361,10 +361,12 @@ isFullVersion() && window.addEventListener(BxEvent.CAPTURE_SCREENSHOT, e => {
|
|||||||
function main() {
|
function main() {
|
||||||
GhPagesUtils.fetchLatestCommit();
|
GhPagesUtils.fetchLatestCommit();
|
||||||
|
|
||||||
|
if (isFullVersion()) {
|
||||||
if (getPref(PrefKey.NATIVE_MKB_MODE) !== NativeMkbMode.OFF) {
|
if (getPref(PrefKey.NATIVE_MKB_MODE) !== NativeMkbMode.OFF) {
|
||||||
const customList = getPref(PrefKey.NATIVE_MKB_FORCED_GAMES);
|
const customList = getPref(PrefKey.NATIVE_MKB_FORCED_GAMES);
|
||||||
BX_FLAGS.ForceNativeMkbTitles.push(...customList);
|
BX_FLAGS.ForceNativeMkbTitles.push(...customList);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
StreamSettings.setup();
|
StreamSettings.setup();
|
||||||
|
|
||||||
|
@ -232,7 +232,7 @@ export const BxExposed = {
|
|||||||
Patcher.patchPage(page);
|
Patcher.patchPage(page);
|
||||||
} : () => {},
|
} : () => {},
|
||||||
|
|
||||||
localCoOpManager: LocalCoOpManager.getInstance(),
|
localCoOpManager: isFullVersion() ? LocalCoOpManager.getInstance() : null,
|
||||||
reactCreateElement: function(...args: any[]) {},
|
reactCreateElement: function(...args: any[]) {},
|
||||||
|
|
||||||
createReactLocalCoOpIcon: isFullVersion() ? (attrs: any): any => {
|
createReactLocalCoOpIcon: isFullVersion() ? (attrs: any): any => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user