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