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); str = str.substring(0, index) + '|| true' + str.substring(index);
return str; 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 = [ let PATCH_ORDERS: PatchArray = [
@ -728,6 +744,8 @@ let PATCH_ORDERS: PatchArray = [
getPref(PrefKey.LOCAL_CO_OP_ENABLED) && 'supportLocalCoOp', getPref(PrefKey.LOCAL_CO_OP_ENABLED) && 'supportLocalCoOp',
getPref(PrefKey.GAME_FORTNITE_FORCE_CONSOLE) && 'forceFortniteConsole', getPref(PrefKey.GAME_FORTNITE_FORCE_CONSOLE) && 'forceFortniteConsole',
getPref(PrefKey.BLOCK_SOCIAL_FEATURES) && 'ignorePlayWithFriendsSection',
...(getPref(PrefKey.BLOCK_TRACKING) ? [ ...(getPref(PrefKey.BLOCK_TRACKING) ? [
'disableAiTrack', 'disableAiTrack',
'disableTelemetry', 'disableTelemetry',

View File

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