|
|
@ -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})];`
|
|
|
|
|
|
|
|
}))
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
]
|
|
|
|
});
|
|
|
|
});
|
|
|
|