Fix NoScreensharePreview
This commit is contained in:
parent
96dff84ed8
commit
45fa4f89c6
1 changed files with 5 additions and 8 deletions
|
@ -25,14 +25,11 @@ export default definePlugin({
|
|||
authors: [Devs.Nuckyz],
|
||||
patches: [
|
||||
{
|
||||
find: '("ApplicationStreamPreviewUploadManager")',
|
||||
replacement: [
|
||||
String.raw`\i\.\i\.makeChunkedRequest\(`,
|
||||
String.raw`\i\.\i\.post\({url:`
|
||||
].map(match => ({
|
||||
match: new RegExp(String.raw`(?=return\[(\d),${match}\i\.\i\.STREAM_PREVIEW.+?}\)\];)`),
|
||||
replace: (_, code) => `return[${code},Promise.resolve({body:"",status:204})];`
|
||||
}))
|
||||
find: '"ApplicationStreamPreviewUploadManager"',
|
||||
replacement: {
|
||||
match: /await \i\.\i\.(makeChunkedRequest\(|post\(\{url:)\i\.\i\.STREAM_PREVIEW.+?\}\)/g,
|
||||
replace: "0"
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue