mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-06 07:37:19 +02:00
Fix crashing in "disableTouchContextMenu" patch
This commit is contained in:
parent
15ae88e9e6
commit
63aaca7d61
2
dist/better-xcloud.user.js
vendored
2
dist/better-xcloud.user.js
vendored
@ -4333,7 +4333,7 @@ if (this.baseStorageKey in window.BX_EXPOSED.overrideSettings) {
|
|||||||
disableTouchContextMenu(str) {
|
disableTouchContextMenu(str) {
|
||||||
let index = str.indexOf('"ContextualCardActions-module__container');
|
let index = str.indexOf('"ContextualCardActions-module__container');
|
||||||
if (index >= 0 && (index = str.indexOf('addEventListener("touchstart"', index)), index >= 0 && (index = PatcherUtils.lastIndexOf(str, "return ", index, 50)), index < 0) return !1;
|
if (index >= 0 && (index = str.indexOf('addEventListener("touchstart"', index)), index >= 0 && (index = PatcherUtils.lastIndexOf(str, "return ", index, 50)), index < 0) return !1;
|
||||||
return str = PatcherUtils.replaceWith(str, index, "return", "return null;"), str;
|
return str = PatcherUtils.replaceWith(str, index, "return", "return () => {};"), str;
|
||||||
}
|
}
|
||||||
}, PATCH_ORDERS = [
|
}, PATCH_ORDERS = [
|
||||||
...getPref("native_mkb_enabled") === "on" ? [
|
...getPref("native_mkb_enabled") === "on" ? [
|
||||||
|
@ -962,7 +962,7 @@ if (this.baseStorageKey in window.BX_EXPOSED.overrideSettings) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
str = PatcherUtils.replaceWith(str, index, 'return', 'return null;');
|
str = PatcherUtils.replaceWith(str, index, 'return', 'return () => {};');
|
||||||
return str;
|
return str;
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user