diff options
author | Nuckyz <61953774+Nuckyz@users.noreply.github.com> | 2023-03-08 00:11:59 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-08 00:11:59 -0300 |
commit | 40395d562aeadaeaa88c5bc106797ea5a4ee51e4 (patch) | |
tree | f5e96be8b32a670bcd5fe86d41ef5c47c6ee3b44 /src/plugins/noScreensharePreview.ts | |
parent | 7322c3af047489e122b59b01825ba5473dc96a62 (diff) | |
download | Vencord-40395d562aeadaeaa88c5bc106797ea5a4ee51e4.tar.gz Vencord-40395d562aeadaeaa88c5bc106797ea5a4ee51e4.tar.bz2 Vencord-40395d562aeadaeaa88c5bc106797ea5a4ee51e4.zip |
Improvements for patches and misc stuff (#582)
Diffstat (limited to 'src/plugins/noScreensharePreview.ts')
-rw-r--r-- | src/plugins/noScreensharePreview.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/noScreensharePreview.ts b/src/plugins/noScreensharePreview.ts index b09f206..50b2a96 100644 --- a/src/plugins/noScreensharePreview.ts +++ b/src/plugins/noScreensharePreview.ts @@ -30,9 +30,9 @@ export default definePlugin({ "\\i\\.default\\.makeChunkedRequest\\(", "\\i\\.\\i\\.post\\({url:" ].map(match => ({ - match: new RegExp(`return\\[(?<code>\\d),${match}\\i\\.\\i\\.STREAM_PREVIEW.+?}\\)\\];`), - replace: 'return[$<code>,Promise.resolve({body:"",status:204})];' + match: new RegExp(`(?=return\\[(\\d),${match}\\i\\.\\i\\.STREAM_PREVIEW.+?}\\)\\];)`), + replace: (_, code) => `return[${code},Promise.resolve({body:"",status:204})];` })) - }, - ], + } + ] }); |