aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/noScreensharePreview.ts
diff options
context:
space:
mode:
authorV <vendicated@riseup.net>2023-08-12 05:27:59 +0200
committerGitHub <noreply@github.com>2023-08-12 05:27:59 +0200
commit3e732646e5ab83f76b34ec7fdb3d9d8c68faca8d (patch)
tree7d407485fa5cfb7a4e14f5d097c1e6d259c39a7b /src/plugins/noScreensharePreview.ts
parentd5b3b510502e952e7d0a6033f6c69fe1042ba3f1 (diff)
downloadVencord-3e732646e5ab83f76b34ec7fdb3d9d8c68faca8d.tar.gz
Vencord-3e732646e5ab83f76b34ec7fdb3d9d8c68faca8d.tar.bz2
Vencord-3e732646e5ab83f76b34ec7fdb3d9d8c68faca8d.zip
Fix plugins broken by latest canary update (#1637)
* Fix WebContextMenus * BetterGifAltText: futureproof find * Fix pronoundb profile patch * Fix NoScreensharePreview * Fix FakeNitro emote text patch --------- Co-authored-by: Nuckyz <61953774+Nuckyz@users.noreply.github.com>
Diffstat (limited to 'src/plugins/noScreensharePreview.ts')
-rw-r--r--src/plugins/noScreensharePreview.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/noScreensharePreview.ts b/src/plugins/noScreensharePreview.ts
index 50b2a96..df3daad 100644
--- a/src/plugins/noScreensharePreview.ts
+++ b/src/plugins/noScreensharePreview.ts
@@ -27,10 +27,10 @@ export default definePlugin({
{
find: '("ApplicationStreamPreviewUploadManager")',
replacement: [
- "\\i\\.default\\.makeChunkedRequest\\(",
- "\\i\\.\\i\\.post\\({url:"
+ String.raw`\i\.\i\.makeChunkedRequest\(`,
+ String.raw`\i\.\i\.post\({url:`
].map(match => ({
- match: new RegExp(`(?=return\\[(\\d),${match}\\i\\.\\i\\.STREAM_PREVIEW.+?}\\)\\];)`),
+ match: new RegExp(String.raw`(?=return\[(\d),${match}\i\.\i\.STREAM_PREVIEW.+?}\)\];)`),
replace: (_, code) => `return[${code},Promise.resolve({body:"",status:204})];`
}))
}