Add "ignorePlayWithFriendsSection" patch

This commit is contained in:
redphx 2024-07-07 16:14:08 +07:00
parent 224e98829d
commit d7ed9e1603
2 changed files with 19 additions and 1 deletions

View File

@ -703,6 +703,22 @@ true` + text;
str = str.substring(0, index) + '|| true' + str.substring(index);
return str;
},
// Don't render Play With Friends sections
ignorePlayWithFriendsSection(str: string) {
let index = str.indexOf('location:"PlayWithFriendsRow",');
if (index === -1) {
return false;
}
index = str.indexOf('return', index - 50);
if (index === -1) {
return false;
}
str = str.substring(0, index) + 'return null;' + str.substring(index + 6);
return str;
}
};
let PATCH_ORDERS: PatchArray = [
@ -728,6 +744,8 @@ let PATCH_ORDERS: PatchArray = [
getPref(PrefKey.LOCAL_CO_OP_ENABLED) && 'supportLocalCoOp',
getPref(PrefKey.GAME_FORTNITE_FORCE_CONSOLE) && 'forceFortniteConsole',
getPref(PrefKey.BLOCK_SOCIAL_FEATURES) && 'ignorePlayWithFriendsSection',
...(getPref(PrefKey.BLOCK_TRACKING) ? [
'disableAiTrack',
'disableTelemetry',

View File

@ -95,12 +95,12 @@ const SETTINGS_UI = {
!AppInterface && PrefKey.UI_SCROLLBAR_HIDE,
PrefKey.HIDE_DOTS_ICON,
PrefKey.REDUCE_ANIMATIONS,
PrefKey.BLOCK_SOCIAL_FEATURES,
],
},
[t('other')]: {
items: [
PrefKey.BLOCK_SOCIAL_FEATURES,
PrefKey.BLOCK_TRACKING,
],
},