From 98a2a2b9899976411fd67df4c7d80d7a525b7ea0 Mon Sep 17 00:00:00 2001 From: city-unit <140349364+city-unit@users.noreply.github.com> Date: Wed, 30 Aug 2023 15:58:14 -0400 Subject: [PATCH] Esc to remove drag elements --- public/scripts/RossAscends-mods.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/public/scripts/RossAscends-mods.js b/public/scripts/RossAscends-mods.js index 681b63cd3..deae25af6 100644 --- a/public/scripts/RossAscends-mods.js +++ b/public/scripts/RossAscends-mods.js @@ -1089,6 +1089,13 @@ export function initRossMods() { } } + if ($(".draggable").is(":visible")) { + // Remove the first matched element + $('.draggable:first').remove(); + return; + } + + if (event.ctrlKey && /^[1-9]$/.test(event.key)) { // Your code here event.preventDefault();