mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-03 06:07:19 +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("byog")) FeatureGates.EnableBYOG = !1, FeatureGates.EnableBYOGPurchase = !1;
|
||||
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 = {
|
||||
getTitleInfo: () => STATES.currentStream.titleInfo,
|
||||
modifyPreloadedState: !1,
|
||||
@ -5098,7 +5085,7 @@ var BxExposed = {
|
||||
],
|
||||
toggleLocalCoOp(enable) {},
|
||||
beforePageLoad: () => {},
|
||||
localCoOpManager: LocalCoOpManager.getInstance(),
|
||||
localCoOpManager: null,
|
||||
reactCreateElement: function(...args) {},
|
||||
createReactLocalCoOpIcon: () => {}
|
||||
};
|
||||
@ -6534,11 +6521,7 @@ window.addEventListener("pagehide", (e) => {
|
||||
BxEventBus.Stream.emit("state.stopped", {});
|
||||
});
|
||||
function main() {
|
||||
if (GhPagesUtils.fetchLatestCommit(), getPref("nativeMkb.mode") !== "off") {
|
||||
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 (GhPagesUtils.fetchLatestCommit(), 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));
|
||||
}
|
||||
main();
|
||||
|
@ -361,9 +361,11 @@ isFullVersion() && window.addEventListener(BxEvent.CAPTURE_SCREENSHOT, e => {
|
||||
function main() {
|
||||
GhPagesUtils.fetchLatestCommit();
|
||||
|
||||
if (getPref(PrefKey.NATIVE_MKB_MODE) !== NativeMkbMode.OFF) {
|
||||
const customList = getPref(PrefKey.NATIVE_MKB_FORCED_GAMES);
|
||||
BX_FLAGS.ForceNativeMkbTitles.push(...customList);
|
||||
if (isFullVersion()) {
|
||||
if (getPref(PrefKey.NATIVE_MKB_MODE) !== NativeMkbMode.OFF) {
|
||||
const customList = getPref(PrefKey.NATIVE_MKB_FORCED_GAMES);
|
||||
BX_FLAGS.ForceNativeMkbTitles.push(...customList);
|
||||
}
|
||||
}
|
||||
|
||||
StreamSettings.setup();
|
||||
|
@ -232,7 +232,7 @@ export const BxExposed = {
|
||||
Patcher.patchPage(page);
|
||||
} : () => {},
|
||||
|
||||
localCoOpManager: LocalCoOpManager.getInstance(),
|
||||
localCoOpManager: isFullVersion() ? LocalCoOpManager.getInstance() : null,
|
||||
reactCreateElement: function(...args: any[]) {},
|
||||
|
||||
createReactLocalCoOpIcon: isFullVersion() ? (attrs: any): any => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user