Update DiscordPreview.js

This commit is contained in:
Mirco Wittrien 2019-04-07 20:02:30 +02:00
parent ef1f818c0a
commit a6c3e50fa3
1 changed files with 3 additions and 1 deletions

View File

@ -12,7 +12,6 @@ window.onmessage = function (e) {
switch (e.data.reason) {
case "OnLoad":
document.body.innerHTML = document.body.innerHTML.replace(/\t|\n|\r/g, "");
if (e.data.webpackJsonp) window.webpackJsonp = e.data.webpackJsonp;
if (e.data.username) {
document.body.innerHTML = document.body.innerHTML.replace(/REPLACE_USERNAMESMALL/gi, e.data.username.toLowerCase());
document.body.innerHTML = document.body.innerHTML.replace(/REPLACE_USERNAME/gi, e.data.username);
@ -73,6 +72,9 @@ window.getString = function (obj) {
}
return string;
};
window.webpackJsonp = function () {
return {default:{m:{},c:{}}};
};
window.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]]]);