Fix "disableTouchContextMenu" patch

This commit is contained in:
redphx
2025-05-29 08:44:16 +07:00
parent 3d2abf6b12
commit bb32d97ae8
3 changed files with 8 additions and 8 deletions

View File

@@ -584,7 +584,7 @@ true` + text;
skipFeedbackDialog(str: string) {
let index = str.indexOf('}shouldTransitionToFeedback(');
index > 0 && (index = PatcherUtils.indexOf(str, '}){', index, 200, true));
index >= 0 && (index = PatcherUtils.indexOf(str, '}){', index, 200, true));
if (index < 0) {
return false;
}
@@ -907,8 +907,8 @@ if (this.baseStorageKey in window.BX_EXPOSED.overrideSettings) {
// Disable long touch activating context menu
disableTouchContextMenu(str: string) {
let index = str.indexOf('arguments.length>2&&void 0!==arguments[2]?arguments[2]:500;');
index >= 0 && (index = str.indexOf('addEventListener("touchstart"', index));
let index = str.indexOf('.addEventListener("touchstart",');
index >= 0 && (index = PatcherUtils.indexOf(str, '.addEventListener("touchend"', index, 200));
index >= 0 && (index = PatcherUtils.lastIndexOf(str, 'return ', index, 50));
if (index < 0) {
return false;