aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/apiNotices.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/apiNotices.ts')
-rw-r--r--src/plugins/apiNotices.ts7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/plugins/apiNotices.ts b/src/plugins/apiNotices.ts
index 8922ace..af7cb15 100644
--- a/src/plugins/apiNotices.ts
+++ b/src/plugins/apiNotices.ts
@@ -29,13 +29,12 @@ export default definePlugin({
find: 'displayName="NoticeStore"',
replacement: [
{
- match: /;.{1,2}=null;.{0,70}getPremiumSubscription/g,
- replace:
- ";if(Vencord.Api.Notices.currentNotice)return false$&"
+ match: /(?=;\i=null;.{0,70}getPremiumSubscription)/g,
+ replace: ";if(Vencord.Api.Notices.currentNotice)return false"
},
{
match: /(?<=,NOTICE_DISMISS:function\(\i\){)(?=if\(null==(\i)\))/,
- replace: 'if($1?.id=="VencordNotice")return($1=null,Vencord.Api.Notices.nextNotice(),true);'
+ replace: (_, notice) => `if(${notice}.id=="VencordNotice")return(${notice}=null,Vencord.Api.Notices.nextNotice(),true);`
}
]
}