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

@@ -757,7 +757,22 @@ if (this.baseStorageKey in window.BX_EXPOSED.overrideSettings) {
`;
str = str.replace(text, text + newCode);
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 = [
@@ -819,6 +834,8 @@ let PLAYING_PATCH_ORDERS: PatchArray = [
'patchStreamHud',
'playVibration',
'alwaysShowStreamHud',
// 'exposeEventTarget',
// Patch volume control for normal stream