mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-06 07:37:19 +02:00
Disable long touch activating context menu
This commit is contained in:
parent
7578671cc3
commit
15ae88e9e6
8
dist/better-xcloud.user.js
vendored
8
dist/better-xcloud.user.js
vendored
@ -4329,6 +4329,11 @@ if (this.baseStorageKey in window.BX_EXPOSED.overrideSettings) {
|
||||
if (index >= 0 && (index = PatcherUtils.lastIndexOf(str, ".All", index, 150)), index < 0) return !1;
|
||||
if (str = PatcherUtils.replaceWith(str, index, ".All", ".Locked"), index = str.indexOf('"Guide_Achievements_Unlocked_Empty","Guide_Achievements_Locked_Empty"'), index >= 0 && (index = PatcherUtils.indexOf(str, ".All", index, 250)), index < 0) return !1;
|
||||
return str = PatcherUtils.replaceWith(str, index, ".All", ".Locked"), str;
|
||||
},
|
||||
disableTouchContextMenu(str) {
|
||||
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;
|
||||
return str = PatcherUtils.replaceWith(str, index, "return", "return null;"), str;
|
||||
}
|
||||
}, PATCH_ORDERS = [
|
||||
...getPref("native_mkb_enabled") === "on" ? [
|
||||
@ -4357,6 +4362,9 @@ if (this.baseStorageKey in window.BX_EXPOSED.overrideSettings) {
|
||||
getPref("ui_hide_sections").includes("all-games") && "ignoreAllGamesSection",
|
||||
getPref("ui_hide_sections").includes("touch") && "ignorePlayWithTouchSection",
|
||||
(getPref("ui_hide_sections").includes("native-mkb") || getPref("ui_hide_sections").includes("most-popular")) && "ignoreSiglSections",
|
||||
...STATES.userAgent.capabilities.touch ? [
|
||||
"disableTouchContextMenu"
|
||||
] : [],
|
||||
...getPref("block_tracking") ? [
|
||||
"disableAiTrack",
|
||||
"disableTelemetry",
|
||||
|
@ -953,7 +953,6 @@ if (this.baseStorageKey in window.BX_EXPOSED.overrideSettings) {
|
||||
return str;
|
||||
},
|
||||
|
||||
/*
|
||||
// Disable long touch activating context menu
|
||||
disableTouchContextMenu(str: string) {
|
||||
let index = str.indexOf('"ContextualCardActions-module__container');
|
||||
@ -966,7 +965,6 @@ if (this.baseStorageKey in window.BX_EXPOSED.overrideSettings) {
|
||||
str = PatcherUtils.replaceWith(str, index, 'return', 'return null;');
|
||||
return str;
|
||||
},
|
||||
*/
|
||||
};
|
||||
|
||||
let PATCH_ORDERS: PatchArray = [
|
||||
@ -1005,6 +1003,10 @@ let PATCH_ORDERS: PatchArray = [
|
||||
getPref(PrefKey.UI_HIDE_SECTIONS).includes(UiSection.TOUCH) && 'ignorePlayWithTouchSection',
|
||||
(getPref(PrefKey.UI_HIDE_SECTIONS).includes(UiSection.NATIVE_MKB) || getPref(PrefKey.UI_HIDE_SECTIONS).includes(UiSection.MOST_POPULAR)) && 'ignoreSiglSections',
|
||||
|
||||
...(STATES.userAgent.capabilities.touch ? [
|
||||
'disableTouchContextMenu',
|
||||
] : []),
|
||||
|
||||
...(getPref(PrefKey.BLOCK_TRACKING) ? [
|
||||
'disableAiTrack',
|
||||
'disableTelemetry',
|
||||
|
Loading…
x
Reference in New Issue
Block a user