From a6c3e50fa34f6465f09e69ee22440ef0b8ba84b0 Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Sun, 7 Apr 2019 20:02:30 +0200 Subject: [PATCH] Update DiscordPreview.js --- Plugins/ThemeRepo/res/DiscordPreview.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Plugins/ThemeRepo/res/DiscordPreview.js b/Plugins/ThemeRepo/res/DiscordPreview.js index 86d1501f21..d34909035c 100644 --- a/Plugins/ThemeRepo/res/DiscordPreview.js +++ b/Plugins/ThemeRepo/res/DiscordPreview.js @@ -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]]]);