Minor fixes

This commit is contained in:
redphx 2024-05-22 18:38:51 +07:00
parent a4a1743062
commit e2e2322d94
5 changed files with 8 additions and 8 deletions

View File

@ -1,8 +1,8 @@
import { NATIVE_FETCH, STATES } from "@utils/global";
import { STATES } from "@utils/global";
import { escapeHtml } from "@utils/html";
import { Toast } from "@utils/toast";
import { BxEvent } from "@utils/bx-event";
import { BX_FLAGS } from "@utils/bx-flags";
import { BX_FLAGS, NATIVE_FETCH } from "@utils/bx-flags";
import { getPref, PrefKey } from "@utils/preferences";
import { t } from "@utils/translation";
import { BxLogger } from "@utils/bx-logger";

View File

@ -23,3 +23,5 @@ export const BX_FLAGS = Object.assign(DEFAULT_FLAGS, window.BX_FLAGS || {});
try {
delete window.BX_FLAGS;
} catch (e) {}
export const NATIVE_FETCH = window.fetch;

View File

@ -5,8 +5,6 @@ export const SCRIPT_HOME = 'https://github.com/redphx/better-xcloud';
export const AppInterface = window.AppInterface;
export const NATIVE_FETCH = window.fetch;
UserAgent.init();
const userAgent = window.navigator.userAgent.toLowerCase();

View File

@ -1,11 +1,11 @@
import { BxEvent } from "@utils/bx-event";
import { BX_FLAGS } from "@utils/bx-flags";
import { BX_FLAGS, NATIVE_FETCH } from "@utils/bx-flags";
import { LoadingScreen } from "@modules/loading-screen";
import { PrefKey, getPref } from "@utils/preferences";
import { RemotePlay } from "@modules/remote-play";
import { StreamBadges } from "@modules/stream/stream-badges";
import { TouchController } from "@modules/touch-controller";
import { NATIVE_FETCH, STATES } from "@utils/global";
import { STATES } from "@utils/global";
import { getPreferredServerRegion } from "@utils/region";
import { GamePassCloudGallery } from "./gamepass-gallery";
import { InputType } from "./bx-exposed";

View File

@ -1,4 +1,4 @@
import { NATIVE_FETCH } from "./global";
import { NATIVE_FETCH } from "./bx-flags";
export const SUPPORTED_LANGUAGES = {
'en-US': 'English (United States)',
@ -364,4 +364,4 @@ export class Translations {
export const t = Translations.get;
await Translations.init();
Translations.init();