From 3c3579c808f36e97ec22d15af60e01bbceefb177 Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Tue, 11 Dec 2018 22:15:42 +0100 Subject: [PATCH] Update ThemeSettings.plugin.js --- Plugins/ThemeSettings/ThemeSettings.plugin.js | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Plugins/ThemeSettings/ThemeSettings.plugin.js b/Plugins/ThemeSettings/ThemeSettings.plugin.js index 9df0f69082..f87269754d 100644 --- a/Plugins/ThemeSettings/ThemeSettings.plugin.js +++ b/Plugins/ThemeSettings/ThemeSettings.plugin.js @@ -7,7 +7,7 @@ class ThemeSettings { getDescription () {return "Allows you to change Theme Variables within BetterDiscord.";} - getVersion () {return "1.0.1";} + getVersion () {return "1.0.2";} getAuthor () {return "DevilBro";} @@ -126,7 +126,7 @@ class ThemeSettings { button.className = "bda-settings-button themes-settings-button"; button.innerText = "Settings"; footer.appendChild(button); - $(button).on("click." + this.getName(), () => { + button.addEventListener("click", () => { li.classList.remove("settings-closed"); li.classList.add("settings-open"); let children = []; @@ -134,14 +134,14 @@ class ThemeSettings { children.push(li.firstChild); li.firstChild.remove(); } - $(`
`) - .on("click." + this.getName(), () => { - li.classList.remove("settings-open"); - li.classList.add("settings-closed"); - while (li.childElementCount) li.firstChild.remove(); - while (children.length) li.appendChild(children.shift()); - }) - .appendTo(li); + let closebutton = $(`
`)[0]; + li.appendChild(closebutton); + closebutton.addEventListener("click", () => { + li.classList.remove("settings-open"); + li.classList.add("settings-closed"); + while (li.childElementCount) li.firstChild.remove(); + while (children.length) li.appendChild(children.shift()); + }) li.appendChild(this.createThemeSettings(name, vars)); }); }