mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-25 17:03:03 +02:00
Add "disableTelemetryProvider" patch
This commit is contained in:
parent
928a1484d7
commit
69a8db092e
@ -7904,6 +7904,26 @@ class Patcher {
|
|||||||
return funcStr.replace(text, '.disableTelemetry=function(){return!0}');
|
return funcStr.replace(text, '.disableTelemetry=function(){return!0}');
|
||||||
},
|
},
|
||||||
|
|
||||||
|
disableTelemetryProvider: function(funcStr) {
|
||||||
|
const text = 'this.enableLightweightTelemetry=!';
|
||||||
|
if (!funcStr.includes(text)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
const newCode = [
|
||||||
|
'this.trackEvent',
|
||||||
|
'this.trackPageView',
|
||||||
|
'this.trackHttpCompleted',
|
||||||
|
'this.trackHttpFailed',
|
||||||
|
'this.trackError',
|
||||||
|
'this.trackErrorLike',
|
||||||
|
'this.onTrackEvent',
|
||||||
|
'()=>{}',
|
||||||
|
].join('=');
|
||||||
|
|
||||||
|
return funcStr.replace(text, newCode + ';' + text);
|
||||||
|
},
|
||||||
|
|
||||||
// Disable IndexDB logging
|
// Disable IndexDB logging
|
||||||
disableIndexDbLogging(funcStr) {
|
disableIndexDbLogging(funcStr) {
|
||||||
const text = 'async addLog(e,t=1e4){';
|
const text = 'async addLog(e,t=1e4){';
|
||||||
@ -8004,7 +8024,7 @@ class Patcher {
|
|||||||
},
|
},
|
||||||
|
|
||||||
enableXcloudLogger: function(funcStr) {
|
enableXcloudLogger: function(funcStr) {
|
||||||
const text = 'this.telemetryProvider=e}log(e,t,r){';
|
const text = 'this.telemetryProvider=e}log(e,t,i){';
|
||||||
if (!funcStr.includes(text)) {
|
if (!funcStr.includes(text)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -8268,6 +8288,8 @@ if (gamepadFound) {
|
|||||||
'disableTelemetry',
|
'disableTelemetry',
|
||||||
],
|
],
|
||||||
|
|
||||||
|
getPref(Preferences.BLOCK_TRACKING) && ['disableTelemetryProvider'],
|
||||||
|
|
||||||
['disableStreamGate'],
|
['disableStreamGate'],
|
||||||
|
|
||||||
getPref(Preferences.UI_LAYOUT) === 'tv' && ['tvLayout'],
|
getPref(Preferences.UI_LAYOUT) === 'tv' && ['tvLayout'],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user