Update DiscordPreview.js

This commit is contained in:
Mirco Wittrien 2020-09-09 21:56:31 +02:00
parent 020d91d212
commit 3c6f462471
1 changed files with 10 additions and 0 deletions

View File

@ -230,6 +230,16 @@
};
};
window.fetch = function () {
return new Promise(_ => {});
};
let XMLHttpRequestProto = XMLHttpRequest.prototype;
window.XMLHttpRequest = class {};
for (let key of Object.keys(XMLHttpRequestProto)) try {
if (typeof XMLHttpRequestProto[key] == "function") window.XMLHttpRequest.prototype[key] = _ => {return new Promise(_ => {});};
} catch(err) {}
let WebModulesFind = function (filter) {
const id = "PluginRepo-WebModules";
const req = typeof(window.webpackJsonp) == "function" ? window.webpackJsonp([], {[id]: (module, exports, req) => exports.default = req}, [id]).default : window.webpackJsonp.push([[], {[id]: (module, exports, req) => module.exports = req}, [[id]]]);