Fix Patches

This commit is contained in:
thororen1234 2026-02-02 15:30:54 -05:00
parent 23d1de8ec7
commit 47a2ae3e6f
No known key found for this signature in database
3 changed files with 5 additions and 6 deletions

View file

@ -1288,8 +1288,8 @@ export default definePlugin({
// Allows in-progress Quests to still show.
find: "QUESTS_BAR,questId",
replacement: {
match: /return null==(\i)\?null:\(/,
replace: "return !$self.shouldHideQuestPopup($1)&&("
match: /(?<=quest:(\i)\}\);)return/,
replace: "return !$self.shouldHideQuestPopup($1)&&"
}
},
{

View file

@ -174,9 +174,8 @@ export default definePlugin({
find: '["strong","em","u","text","inlineCode","s","spoiler"]',
replacement: [
{
match: /(?=return\{hasSpoilerEmbeds:\i,content:(\i))/,
replace: (_: any, content: string) =>
`${content}=$self.patchToneIndicators(${content});`,
match: /(?=return\{hasSpoilerEmbeds:\i,.{0,15}content:(\i))/,
replace: "$1=$self.patchToneIndicators($1);",
},
],
},

View file

@ -299,7 +299,7 @@ export default definePlugin({
{
// Patch the rendered message content to add fake nitro emojis or remove sticker links
predicate: () => settings.store.transformEmojis || settings.store.transformStickers,
match: /(?=return{hasSpoilerEmbeds:\i,content:(\i))/,
match: /(?=return\{hasSpoilerEmbeds:\i,.{0,15}content:(\i))/,
replace: (_, content) => `${content}=$self.patchFakeNitroEmojisOrRemoveStickersLinks(${content},arguments[2]?.formatInline);`
}
]