Fix "patchShowSensorControls" patch

This commit is contained in:
redphx 2024-12-18 06:08:09 +07:00
parent 06a9ca9db8
commit 91deba793c

View File

@ -541,12 +541,12 @@ BxLogger.info('patchRemotePlayMkb', ${configsVar});
}, },
patchShowSensorControls(str: string) { patchShowSensorControls(str: string) {
let text = '{shouldShowSensorControls:'; let text = ',{shouldShowSensorControls:';
if (!str.includes(text)) { if (!str.includes(text)) {
return false; return false;
} }
const newCode = `{shouldShowSensorControls: (window.BX_EXPOSED && window.BX_EXPOSED.shouldShowSensorControls) ||`; const newCode = `,{shouldShowSensorControls: (window.BX_EXPOSED && window.BX_EXPOSED.shouldShowSensorControls) ||`;
str = str.replace(text, newCode); str = str.replace(text, newCode);
return str; return str;