From 0e348756ec4c80225af3c8c031481e617971ad5b Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Sat, 19 Sep 2020 14:32:38 +0200 Subject: [PATCH] stuff --- Library/0BDFDB.plugin.js | 1 + Plugins/_res/DiscordPreview.js | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Library/0BDFDB.plugin.js b/Library/0BDFDB.plugin.js index cc8f2e0052..fdd9bd69ba 100644 --- a/Library/0BDFDB.plugin.js +++ b/Library/0BDFDB.plugin.js @@ -3990,6 +3990,7 @@ module.exports = (_ => { BDFDB.DiscordClassModules = Object.assign({}, DiscordClassModules); const DiscordClasses = Object.assign({}, InternalData.DiscordClasses); + BDFDB.DiscordClasses = Object.assign({}, DiscordClasses); InternalBDFDB.getDiscordClass = (item, selector) => { let className = DiscordClassModules.BDFDB.BDFDBundefined; if (DiscordClasses[item] === undefined) { diff --git a/Plugins/_res/DiscordPreview.js b/Plugins/_res/DiscordPreview.js index a8ab74439f..8a8c471aed 100644 --- a/Plugins/_res/DiscordPreview.js +++ b/Plugins/_res/DiscordPreview.js @@ -56,11 +56,10 @@ document.body.innerHTML = newHTML; } - if (data.nativecss || data.nativeCSS) { - let theme = document.createElement("link"); + if (data.nativeCSS) { + let theme = document.createElement("style"); theme.classList.add(data.reason); - theme.rel = "stylesheet"; - theme.href = (data.nativecss || data.nativeCSS).replace("discordapp.com", "discord.com"); + theme.innerText = data.nativeCSS; document.head.appendChild(theme); }