mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-07 16:17:20 +02:00
Add "ignorePlayWithFriendsSection" patch
This commit is contained in:
parent
224e98829d
commit
d7ed9e1603
@ -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',
|
||||||
|
@ -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,
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user