Fix virtual controller stopped working (#731)

This commit is contained in:
redphx
2025-06-06 07:25:11 +07:00
parent 4bf3bd3bb4
commit 3a3fc77e83
3 changed files with 7 additions and 9 deletions

View File

@@ -632,13 +632,12 @@ true` + text;
},
exposeInputChannel(str: string) {
let index = str.indexOf('this.flushData=');
if (index < 0) {
let text = '()(this,"flushData",(';
if (!str.includes(text)) {
return false;
}
const newCode = 'window.BX_EXPOSED.inputChannel = this,';
str = PatcherUtils.insertAt(str, index, newCode);
str = str.replace(text, '()(window.BX_EXPOSED.inputChannel = this, "flushData", (');
return str;
},