mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-25 08:53:04 +02:00
Remote Play: Prevent adding "Fortnite" to the "Jump back in" list
This commit is contained in:
parent
c90e013dc1
commit
9308963bc2
@ -151,22 +151,41 @@ const PATCHES = {
|
||||
return str.replace(text, codeRemotePlayEnable);
|
||||
},
|
||||
|
||||
// Disable achievement toast in Remote Play
|
||||
// Remote Play: Disable achievement toast
|
||||
remotePlayDisableAchievementToast(str: string) {
|
||||
const text = '.AchievementUnlock:{';
|
||||
if (!str.includes(text)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const newCode = `
|
||||
if (!!window.BX_REMOTE_PLAY_CONFIG) {
|
||||
return;
|
||||
}
|
||||
`;
|
||||
|
||||
const newCode = `if (!!window.BX_REMOTE_PLAY_CONFIG) return;`;
|
||||
return str.replace(text, text + newCode);
|
||||
},
|
||||
|
||||
// Remote Play: Prevent adding "Fortnite" to the "Jump back in" list
|
||||
remotePlayRecentlyUsedTitleIds(str: string) {
|
||||
const text = '(e.data.recentlyUsedTitleIds)){';
|
||||
if (!str.includes(text)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const newCode = `if (window.BX_REMOTE_PLAY_CONFIG) return;`;
|
||||
return str.replace(text, text + newCode);
|
||||
},
|
||||
|
||||
// Remote Play: change web page's title
|
||||
/*
|
||||
remotePlayWebTitle(str: string) {
|
||||
const text = '"undefined"!==typeof e&&document.title!==e';
|
||||
if (!str.includes(text)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const newCode = `if (window.BX_REMOTE_PLAY_CONFIG) { e = "${t('remote-play')} - ${t('better-xcloud')}"; }`;
|
||||
return str.replace(text, newCode + text);
|
||||
},
|
||||
*/
|
||||
|
||||
// Block WebRTC stats collector
|
||||
blockWebRtcStatsCollector(str: string) {
|
||||
const text = 'this.shouldCollectStats=!0';
|
||||
@ -984,6 +1003,7 @@ let PATCH_ORDERS: PatchArray = [
|
||||
'remotePlayKeepAlive',
|
||||
'remotePlayDirectConnectUrl',
|
||||
'remotePlayDisableAchievementToast',
|
||||
'remotePlayRecentlyUsedTitleIds',
|
||||
STATES.userAgent.capabilities.touch && 'patchUpdateInputConfigurationAsync',
|
||||
] : []),
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user