diff options
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})];` })) - }, - ], + } + ] }); |