From 15bb18644faba9f4285145af16e20ca93d8c9a6d Mon Sep 17 00:00:00 2001 From: redphx <96280+redphx@users.noreply.github.com> Date: Fri, 13 Dec 2024 05:56:02 +0700 Subject: [PATCH] Fix wait time stopped showing in game tile (#597) --- dist/better-xcloud.user.js | 6 +++--- src/modules/patcher/patcher.ts | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dist/better-xcloud.user.js b/dist/better-xcloud.user.js index 34c14ca..87b6b18 100755 --- a/dist/better-xcloud.user.js +++ b/dist/better-xcloud.user.js @@ -4615,8 +4615,8 @@ if (this.baseStorageKey in window.BX_EXPOSED.overrideSettings) { let commaIndex = str.indexOf(",", index - 10); return str = str.substring(0, commaIndex) + ",true" + str.substring(index), str; }, - patchSetCurrentlyFocusedInteractable(str) { - let index = str.indexOf(".setCurrentlyFocusedInteractable=("); + patchSetCurrentFocus(str) { + let index = str.indexOf(".setCurrentFocus=("); if (index < 0) return !1; return index = str.indexOf("{", index) + 1, str = PatcherUtils.insertAt(str, index, "e && BxEvent.dispatch(window, BxEvent.NAVIGATION_FOCUS_CHANGED, { element: e });"), str; }, @@ -4704,7 +4704,7 @@ ${subsVar} = subs; "enableTvRoutes", "supportLocalCoOp", "overrideStorageGetSettings", - getPref("ui.gameCard.waitTime.show") && "patchSetCurrentlyFocusedInteractable", + getPref("ui.gameCard.waitTime.show") && "patchSetCurrentFocus", getPref("ui.layout") !== "default" && "websiteLayout", getPref("game.fortnite.forceConsole") && "forceFortniteConsole", ...STATES.userAgent.capabilities.touch ? [ diff --git a/src/modules/patcher/patcher.ts b/src/modules/patcher/patcher.ts index 3253208..06e0ec0 100755 --- a/src/modules/patcher/patcher.ts +++ b/src/modules/patcher/patcher.ts @@ -835,9 +835,9 @@ if (this.baseStorageKey in window.BX_EXPOSED.overrideSettings) { return str; }, - // 24225.js#4127, 24.17.11 - patchSetCurrentlyFocusedInteractable(str: string) { - let index = str.indexOf('.setCurrentlyFocusedInteractable=('); + // 49851.js#4083, 27.0.4 + patchSetCurrentFocus(str: string) { + let index = str.indexOf('.setCurrentFocus=('); if (index < 0) { return false; } @@ -1017,7 +1017,7 @@ let PATCH_ORDERS = PatcherUtils.filterPatches([ 'supportLocalCoOp', 'overrideStorageGetSettings', - getPref(PrefKey.UI_GAME_CARD_SHOW_WAIT_TIME) && 'patchSetCurrentlyFocusedInteractable', + getPref(PrefKey.UI_GAME_CARD_SHOW_WAIT_TIME) && 'patchSetCurrentFocus', getPref(PrefKey.UI_LAYOUT) !== UiLayout.DEFAULT && 'websiteLayout', getPref(PrefKey.GAME_FORTNITE_FORCE_CONSOLE) && 'forceFortniteConsole',