Merge branch 'dev' into modules-proxy-patches

This commit is contained in:
Nuckyz 2024-07-12 16:43:06 -03:00
commit 3edc36d5e0
No known key found for this signature in database
GPG key ID: 440BF8296E1C4AD9
2 changed files with 11 additions and 2 deletions

View file

@ -39,6 +39,15 @@ export default definePlugin({
} }
}), }),
patches: [ patches: [
// Only one of the two patches will be at effect; Discord often updates to switch between them.
// See: https://discord.com/channels/1015060230222131221/1032770730703716362/1261398512017477673
{
find: ".ENTER&&(!",
replacement: {
match: /(?<=(\i)\.which===\i\.\i.ENTER&&).{0,100}(\(0,\i\.\i\)\(\i\)).{0,100}(?=&&\(\i\.preventDefault)/,
replace: "$self.shouldSubmit($1, $2)"
}
},
{ {
find: "!this.hasOpenCodeBlock()", find: "!this.hasOpenCodeBlock()",
replacement: { replacement: {

View file

@ -88,8 +88,8 @@ export default definePlugin({
{ {
find: "useCanFavoriteChannel", find: "useCanFavoriteChannel",
replacement: { replacement: {
match: /!\(\i\.isDM\(\)\|\|\i\.isThread\(\)\)/, match: /\i\.isDM\(\)\|\|\i\.isThread\(\)/,
replace: "true", replace: "false",
} }
} }
], ],