From 77492061f57250717f0140d81ae62a46afa71518 Mon Sep 17 00:00:00 2001 From: Ulysses Zhan Date: Sun, 30 Jun 2024 15:59:36 -0700 Subject: [PATCH] ctrlEnterSend: fix for new Discord update (#2647) --- src/plugins/ctrlEnterSend/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/ctrlEnterSend/index.ts b/src/plugins/ctrlEnterSend/index.ts index ee218060..6c9b7ac1 100644 --- a/src/plugins/ctrlEnterSend/index.ts +++ b/src/plugins/ctrlEnterSend/index.ts @@ -40,9 +40,9 @@ export default definePlugin({ }), patches: [ { - find: ".ENTER&&(!", + find: "!this.hasOpenCodeBlock()", replacement: { - match: /(?<=(\i)\.which===\i\.\i.ENTER&&).{0,100}(\(0,\i\.\i\)\(\i\)).{0,100}(?=&&\(\i\.preventDefault)/, + match: /!(\i).shiftKey&&!(this.hasOpenCodeBlock\(\))&&\(.{0,100}?\)/, replace: "$self.shouldSubmit($1, $2)" } }