diff --git a/Library/0BDFDB.plugin.js b/Library/0BDFDB.plugin.js index c34dcb4bc8..713144c085 100644 --- a/Library/0BDFDB.plugin.js +++ b/Library/0BDFDB.plugin.js @@ -7320,7 +7320,7 @@ module.exports = (_ => { props.hasCustomControls = true; let url = plugin.rawUrl ||`https://mwittrien.github.io/BetterDiscordAddons/Plugins/${plugin.name}/${plugin.name}.plugin.js`; let controls = []; - let footerControls = card.querySelector("." + BDFDB.disCN._repofooter.split(" ")[0] + " ." + BDFDB.disCN._repocontrols.split(" ")[0]); + let footerControls = card.querySelector("." + BDFDB.disCN._repofooter.split(" ")[0] + " " + BDFDB.dotCN._repocontrols); if (plugin.changeLog) controls.push(InternalBDFDB.createCustomControl({ tooltipText: BDFDB.LanguageUtils.LanguageStrings.CHANGE_LOG, svgName: InternalComponents.LibraryComponents.SvgIcon.Names.CHANGELOG, diff --git a/Plugins/ThemeSettings/ThemeSettings.plugin.js b/Plugins/ThemeSettings/ThemeSettings.plugin.js index ae25cf2aef..e1eef494a6 100644 --- a/Plugins/ThemeSettings/ThemeSettings.plugin.js +++ b/Plugins/ThemeSettings/ThemeSettings.plugin.js @@ -50,6 +50,8 @@ module.exports = (_ => { start() {this.load();} stop() {} } : (([Plugin, BDFDB]) => { + const isBeta = !(window.BdApi && !Array.isArray(BdApi.settings)); + var dir; return class ThemeSettings extends Plugin { @@ -79,18 +81,9 @@ module.exports = (_ => { if (addon && !addon.plugin && !addon.instance && addon.css) { let vars = this.getThemeVars(addon.css); if (vars.length) { - let footer = card.querySelector("." + BDFDB.dotCN._repofooter.split(".").filter(n => n).join(",.")); - if (!footer) { - footer = document.createElement("div"); - footer.className = BDFDB.DOMUtils.formatClassName(BDFDB.disCN._repofooter); - let links = document.createElement("span"); - links.className = BDFDB.DOMUtils.formatClassName(BDFDB.disCN._repolinks); - footer.appendChild(links); - card.appendChild(footer); - } - let settingsButton = document.createElement("button"); - let controls = footer.querySelector("." + BDFDB.disCN._repocontrols.split(" ")[0]); - if (controls) { + if (isBeta) { + let controls = card.querySelector("." + BDFDB.disCN._repofooter.split(" ")[0] + " " + BDFDB.dotCN._repocontrols); + let settingsButton = document.createElement("button"); settingsButton.className = BDFDB.DOMUtils.formatClassName(BDFDB.disCN._repobutton, BDFDB.disCN._repocontrolsbutton, "theme-settings-button"); settingsButton.appendChild(BDFDB.DOMUtils.create(` @@ -109,6 +102,16 @@ module.exports = (_ => { }); } else { + let footer = card.querySelector(BDFDB.dotCN._repofooter); + if (!footer) { + footer = document.createElement("div"); + footer.className = BDFDB.DOMUtils.formatClassName(BDFDB.disCN._repofooter); + let links = document.createElement("span"); + links.className = BDFDB.DOMUtils.formatClassName(BDFDB.disCN._repolinks); + footer.appendChild(links); + card.appendChild(footer); + } + let settingsButton = document.createElement("button"); settingsButton.className = BDFDB.DOMUtils.formatClassName(BDFDB.disCN._reposettingsbutton, "theme-settings-button"); settingsButton.innerText = "Settings"; footer.appendChild(settingsButton);