mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-06 23:57:19 +02:00
Add "disableSendMetadata" patch
This commit is contained in:
parent
9ab63c4a53
commit
01502363ab
8
dist/better-xcloud.user.js
vendored
8
dist/better-xcloud.user.js
vendored
@ -4383,6 +4383,11 @@ if (this.baseStorageKey in window.BX_EXPOSED.overrideSettings) {
|
||||
let index = str.indexOf('"ContextualCardActions-module__container');
|
||||
if (index >= 0 && (index = str.indexOf('addEventListener("touchstart"', index)), index >= 0 && (index = PatcherUtils.lastIndexOf(str, "return ", index, 50)), index < 0) return !1;
|
||||
return str = PatcherUtils.replaceWith(str, index, "return", "return () => {};"), str;
|
||||
},
|
||||
disableSendMetadata(str) {
|
||||
let text = "this.sendMetadata(),this.isStreamActive()";
|
||||
if (!str.includes(text)) return !1;
|
||||
return str = str.replaceAll(text, "true; return;" + text), str;
|
||||
}
|
||||
}, PATCH_ORDERS = [
|
||||
...getPref("native_mkb_enabled") === "on" ? [
|
||||
@ -4438,6 +4443,9 @@ if (this.baseStorageKey in window.BX_EXPOSED.overrideSettings) {
|
||||
"patchStreamHud",
|
||||
"playVibration",
|
||||
"alwaysShowStreamHud",
|
||||
...getPref("block_tracking") ? [
|
||||
"disableSendMetadata"
|
||||
] : [],
|
||||
getPref("audio_enable_volume_control") && !getPref("stream_combine_sources") && "patchAudioMediaStream",
|
||||
getPref("audio_enable_volume_control") && getPref("stream_combine_sources") && "patchCombinedAudioVideoMediaStream",
|
||||
getPref("stream_disable_feedback_dialog") && "skipFeedbackDialog",
|
||||
|
@ -971,6 +971,16 @@ if (this.baseStorageKey in window.BX_EXPOSED.overrideSettings) {
|
||||
str = PatcherUtils.replaceWith(str, index, 'return', 'return () => {};');
|
||||
return str;
|
||||
},
|
||||
|
||||
disableSendMetadata(str: string) {
|
||||
let text = 'this.sendMetadata(),this.isStreamActive()';
|
||||
if (!str.includes(text)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
str = str.replaceAll(text, 'true; return;' + text);
|
||||
return str;
|
||||
},
|
||||
};
|
||||
|
||||
let PATCH_ORDERS: PatchArray = [
|
||||
@ -1046,6 +1056,10 @@ let PLAYING_PATCH_ORDERS: PatchArray = [
|
||||
|
||||
'alwaysShowStreamHud',
|
||||
|
||||
...(getPref(PrefKey.BLOCK_TRACKING) ? [
|
||||
'disableSendMetadata',
|
||||
] : []),
|
||||
|
||||
// 'exposeEventTarget',
|
||||
|
||||
// Patch volume control for normal stream
|
||||
|
Loading…
x
Reference in New Issue
Block a user