Fix more plugins

This commit is contained in:
thororen1234 2026-02-04 16:42:06 -05:00
parent 71864c42a6
commit 27ee50fd65
No known key found for this signature in database
4 changed files with 5 additions and 5 deletions

View file

@ -24,7 +24,7 @@ export default definePlugin({
// Uses the audio as-is if external, otherwise checks for an internal Discord sound.
// Also force loads the internal sounds module to account for the second patch group below,
// as well as accounting for not calling the module in this patch when this.type is not DISCORD.
match: /(let \i=class.{0,900}?new Audio;\i.src=)((\i\(\d+\)).{0,50}concat\()this.name(,".mp3"\)\))/,
match: /(let \i=class.{0,900}?new Audio;\i.src=)((\i\(\d+\))\(`\.\/\$\{)this.name(\}\.mp3`\))/,
replace: "$3;$1this.type!==$self.AudioType.DISCORD?this.audio:$2this.audio$4"
},
{

View file

@ -113,7 +113,7 @@ export default definePlugin({
// Detects paste events triggered inside of Discord's text input.
find: ",origin:\"clipboard\"});",
replacement: {
match: /(?<="handlePaste",(\i)=>{)(?=var)/,
match: /(?<=handlePaste=(\i)=>{)(?=let)/,
replace: "if($self.isPastingDisabled(true)){$1.preventDefault?.();$1.stopPropagation?.();return;}"
}
},

View file

@ -29,8 +29,8 @@ export default definePlugin({
{
find: '="ABOVE"',
replacement: {
match: /:300/,
replace: ":0",
match: /\?\?300/,
replace: "??0",
}
},
{

View file

@ -152,7 +152,7 @@ export default definePlugin({
{
find: '"CustomStatusModalWithPreview"',
replacement: {
match: /(?<=(\i)\.state\).*?)\{text:\i\.\i\.\i\(\i\.\i#{intl::SAVE}\)/,
match: /(?<=(\i)\?\.state\?\?.*?)\{text:\i\.\i\.\i\(\i\.\i#{intl::SAVE}\)/,
replace: "$self.renderRememberButton($1),$&"
}
},