From 0c053fb76508396228f352beaafbcb566135a8b3 Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Sat, 11 Apr 2020 19:29:23 +0200 Subject: [PATCH] Update DiscordPreview.js --- Plugins/ThemeRepo/res/DiscordPreview.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Plugins/ThemeRepo/res/DiscordPreview.js b/Plugins/ThemeRepo/res/DiscordPreview.js index ba31034b64..9db46e83bf 100644 --- a/Plugins/ThemeRepo/res/DiscordPreview.js +++ b/Plugins/ThemeRepo/res/DiscordPreview.js @@ -42,7 +42,7 @@ if (data.avatar) document.body.innerHTML = document.body.innerHTML.replace(/REPLACE_AVATAR/gi, data.avatar.split('"').join('') + "?size="); if (data.discriminator) document.body.innerHTML = document.body.innerHTML.replace(/REPLACE_DISCRIMINATOR/gi, data.discriminator); if (data.classes) DiscordClasses = JSON.parse(data.classes); - if (data.classmodules) DiscordClassModules = JSON.parse(data.classmodules); + if (data.classmodules || data.classModules) DiscordClassModules = JSON.parse(data.classmodules || data.classModules); if (disCN != undefined && DiscordClasses != undefined && DiscordClassModules != undefined) { let oldHTML = document.body.innerHTML.split("REPLACE_CLASS_"); @@ -54,11 +54,11 @@ document.body.innerHTML = newHTML; } - if (data.nativecss) { + if (data.nativecss || data.nativeCSS) { let theme = document.createElement("link"); theme.classList.add(data.reason); theme.rel = "stylesheet"; - theme.href = data.nativecss; + theme.href = data.nativecss || data.nativeCSS; document.head.appendChild(theme); } @@ -66,7 +66,7 @@ document.documentElement.classList.add("mouse-mode"); document.documentElement.classList.add("full-motion"); - if (data.titlebar) document.querySelector(".preview-titlebar").outerHTML = data.titlebar; + if (data.titlebar || data.titleBar) document.querySelector(".preview-titlebar").outerHTML = data.titlebar || data.titleBar; document.body.firstElementChild.style.removeProperty("display");