Fix "ignorePlayWithFriendsSection" patch

This commit is contained in:
redphx 2025-05-29 07:53:13 +07:00
parent fdb4e58b5d
commit 62cf045f05
3 changed files with 6 additions and 7 deletions

View File

@ -5473,8 +5473,8 @@ true` + text;
ignorePlayWithFriendsSection(str) {
let index = str.indexOf('location:"PlayWithFriendsRow",');
if (index < 0) return !1;
if (index = PatcherUtils.lastIndexOf(str, "return", index, 50), index < 0) return !1;
return str = PatcherUtils.replaceWith(str, index, "return", "return null;"), str;
if (index = PatcherUtils.lastIndexOf(str, "=>", index, 50), index < 0) return !1;
return str = PatcherUtils.replaceWith(str, index, "=>", "=> true ? null :"), str;
},
ignoreAllGamesSection(str) {
let index = str.indexOf('className:"AllGamesRow-module__allGamesRowContainer');
@ -5616,7 +5616,6 @@ ${subsVar} = subs;
gameCardCustomIcons(str) {
let initialIndex = str.indexOf("const{supportedInputIcons:");
if (initialIndex < 0) return !1;
debugger;
let returnIndex = PatcherUtils.lastIndexOf(str, "return ", str.indexOf("SupportedInputsBadge"));
if (returnIndex < 0) return !1;
let productIdIndex = PatcherUtils.lastIndexOf(str, ",productId:", initialIndex, 300);

File diff suppressed because one or more lines are too long

View File

@ -695,12 +695,12 @@ true` + text;
return false;
}
index = PatcherUtils.lastIndexOf(str, 'return', index, 50);
index = PatcherUtils.lastIndexOf(str, '=>', index, 50);
if (index < 0) {
return false;
}
str = PatcherUtils.replaceWith(str, index, 'return', 'return null;');
str = PatcherUtils.replaceWith(str, index, '=>', '=> true ? null :');
return str;
},