Improvements for patches and misc stuff (#582)

This commit is contained in:
Nuckyz
2023-03-08 00:11:59 -03:00
committed by GitHub
parent 7322c3af04
commit 40395d562a
15 changed files with 324 additions and 282 deletions

View File

@ -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);`
}
]
}