From d2839b2b7c625d9f5c21f699f940011a366fdbcd Mon Sep 17 00:00:00 2001 From: redphx <96280+redphx@users.noreply.github.com> Date: Fri, 2 Aug 2024 05:56:35 +0700 Subject: [PATCH] Fix crashing when hiding "Play with touch" section --- dist/better-xcloud.user.js | 2 +- src/modules/patcher.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/better-xcloud.user.js b/dist/better-xcloud.user.js index 91b3456..622a453 100644 --- a/dist/better-xcloud.user.js +++ b/dist/better-xcloud.user.js @@ -3969,7 +3969,7 @@ true,this._connectionType=`; let index = str.indexOf('("Play_With_Touch"),'); if (index < 0) return !1; - if (index = str.indexOf("const ", index - 100), index < 0) + if (index = str.indexOf("const ", index - 30), index < 0) return !1; return str = str.substring(0, index) + "return null;" + str.substring(index), str; }, diff --git a/src/modules/patcher.ts b/src/modules/patcher.ts index 4a5c2cd..f3562ca 100644 --- a/src/modules/patcher.ts +++ b/src/modules/patcher.ts @@ -750,7 +750,7 @@ true` + text; return false; } - index = str.indexOf('const ', index - 100); + index = str.indexOf('const ', index - 30); if (index < 0) { return false; }