Add "alwaysShowStreamHud" patch

This commit is contained in:
redphx
2024-07-08 17:17:28 +07:00
parent c6acc251ae
commit 10d0dedc0a
2 changed files with 27 additions and 1 deletions

View File

@@ -5839,6 +5839,14 @@ if (this.baseStorageKey in window.BX_EXPOSED.overrideSettings) {
} }
`; `;
return str2 = str2.replace("}getSetting(e){", "}getSetting(e){" + newCode), str2; return str2 = str2.replace("}getSetting(e){", "}getSetting(e){" + newCode), str2;
},
alwaysShowStreamHud(str2) {
let index = str2.indexOf(",{onShowStreamMenu:");
if (index === -1)
return !1;
if (index = str2.indexOf("&&(0,", index - 100), index === -1)
return !1;
return str2 = str2.substring(0, index) + "|| true" + str2.substring(index), str2;
} }
}, PATCH_ORDERS = [ }, PATCH_ORDERS = [
...getPref(PrefKey.NATIVE_MKB_ENABLED) === "on" ? [ ...getPref(PrefKey.NATIVE_MKB_ENABLED) === "on" ? [
@@ -5883,6 +5891,7 @@ if (this.baseStorageKey in window.BX_EXPOSED.overrideSettings) {
"disableGamepadDisconnectedScreen", "disableGamepadDisconnectedScreen",
"patchStreamHud", "patchStreamHud",
"playVibration", "playVibration",
"alwaysShowStreamHud",
getPref(PrefKey.AUDIO_ENABLE_VOLUME_CONTROL) && !getPref(PrefKey.STREAM_COMBINE_SOURCES) && "patchAudioMediaStream", getPref(PrefKey.AUDIO_ENABLE_VOLUME_CONTROL) && !getPref(PrefKey.STREAM_COMBINE_SOURCES) && "patchAudioMediaStream",
getPref(PrefKey.AUDIO_ENABLE_VOLUME_CONTROL) && getPref(PrefKey.STREAM_COMBINE_SOURCES) && "patchCombinedAudioVideoMediaStream", getPref(PrefKey.AUDIO_ENABLE_VOLUME_CONTROL) && getPref(PrefKey.STREAM_COMBINE_SOURCES) && "patchCombinedAudioVideoMediaStream",
getPref(PrefKey.STREAM_DISABLE_FEEDBACK_DIALOG) && "skipFeedbackDialog", getPref(PrefKey.STREAM_DISABLE_FEEDBACK_DIALOG) && "skipFeedbackDialog",

View File

@@ -757,7 +757,22 @@ if (this.baseStorageKey in window.BX_EXPOSED.overrideSettings) {
`; `;
str = str.replace(text, text + newCode); str = str.replace(text, text + newCode);
return str; return str;
} },
alwaysShowStreamHud(str: string) {
let index = str.indexOf(',{onShowStreamMenu:');
if (index === -1) {
return false;
}
index = str.indexOf('&&(0,', index - 100);
if (index === -1) {
return false;
}
str = str.substring(0, index) + '|| true' + str.substring(index);
return str;
},
}; };
let PATCH_ORDERS: PatchArray = [ let PATCH_ORDERS: PatchArray = [
@@ -819,6 +834,8 @@ let PLAYING_PATCH_ORDERS: PatchArray = [
'patchStreamHud', 'patchStreamHud',
'playVibration', 'playVibration',
'alwaysShowStreamHud',
// 'exposeEventTarget', // 'exposeEventTarget',
// Patch volume control for normal stream // Patch volume control for normal stream