ctrlEnterSend: fix for new Discord update (#2647)

This commit is contained in:
Ulysses Zhan 2024-06-30 15:59:36 -07:00 committed by GitHub
parent 5c05443f45
commit 77492061f5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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)"
}
}