From 943d455fd15495eb67acd820799726e4b5e5855f Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Wed, 24 Apr 2019 08:08:33 +0200 Subject: [PATCH] stuff --- Plugins/OldTitleBar/OldTitleBar.plugin.js | 36 +++---------------- Plugins/PersonalPins/PersonalPins.plugin.js | 13 +------ .../ReadAllNotificationsButton.plugin.js | 17 +++------ Plugins/ThemeRepo/res/ThemeList.txt | 2 -- 4 files changed, 11 insertions(+), 57 deletions(-) diff --git a/Plugins/OldTitleBar/OldTitleBar.plugin.js b/Plugins/OldTitleBar/OldTitleBar.plugin.js index 9829e5388b..3ac64cec1c 100644 --- a/Plugins/OldTitleBar/OldTitleBar.plugin.js +++ b/Plugins/OldTitleBar/OldTitleBar.plugin.js @@ -48,54 +48,28 @@ class OldTitleBar { this.dividerMarkup = `
`; this.reloadButtonMarkup = - BDFDB.DiscordClassModules.HeaderBar.iconMargin ? ` - - - - - - ` - : `
+ `
`; this.minButtonMarkup = - BDFDB.DiscordClassModules.HeaderBar.iconMargin ? ` - - - - - - ` - : `
+ `
`; this.maxButtonMarkup = - BDFDB.DiscordClassModules.HeaderBar.iconMargin ? ` - - - - ` - : `
+ `
`; this.maxButtonInnerMin = ``; this.maxButtonInnerMax = ``; this.closeButtonMarkup = - BDFDB.DiscordClassModules.HeaderBar.iconMargin ? ` - - - - - - ` - : `
+ `
@@ -228,7 +202,7 @@ class OldTitleBar { if (BDFDB.getData("addOldBar", this, "settings")) { var headerbar = BDFDB.htmlToElement(``); this.createButtons(headerbar); - let headerbaricon = BDFDB.DiscordClassModules.HeaderBar.toolbar ? document.querySelector(BDFDB.dotCN.channelheadertoolbar + " > " + BDFDB.dotCN.channelheadericonwrapper) : document.querySelector(BDFDB.dotCN.channelheadertoolbar2 + " > " + BDFDB.dotCN.channelheadericonmargin); + let headerbaricon = document.querySelector(BDFDB.dotCN.channelheadertoolbar + " > " + BDFDB.dotCN.channelheadericonwrapper); if (headerbaricon) headerbaricon.parentElement.appendChild(headerbar); this.changeMaximizeButtons(); } diff --git a/Plugins/PersonalPins/PersonalPins.plugin.js b/Plugins/PersonalPins/PersonalPins.plugin.js index 9a47bf0453..656d0ce5f5 100644 --- a/Plugins/PersonalPins/PersonalPins.plugin.js +++ b/Plugins/PersonalPins/PersonalPins.plugin.js @@ -24,18 +24,7 @@ class PersonalPins { }; this.notesButtonMarkup = - BDFDB.DiscordClassModules.HeaderBar.iconMargin ? ` - - - - - - - - - - ` - : `
+ `
diff --git a/Plugins/ReadAllNotificationsButton/ReadAllNotificationsButton.plugin.js b/Plugins/ReadAllNotificationsButton/ReadAllNotificationsButton.plugin.js index 4c3292dbc1..26cccdeae7 100644 --- a/Plugins/ReadAllNotificationsButton/ReadAllNotificationsButton.plugin.js +++ b/Plugins/ReadAllNotificationsButton/ReadAllNotificationsButton.plugin.js @@ -3,7 +3,7 @@ class ReadAllNotificationsButton { getName () {return "ReadAllNotificationsButton";} - getVersion () {return "1.4.4";} + getVersion () {return "1.4.5";} getAuthor () {return "DevilBro";} @@ -11,7 +11,7 @@ class ReadAllNotificationsButton { initConstructor () { this.changelog = { - "fixed":[["Canary/PTB","Fixed the plugin for canary and ptb"]] + "fixed":[["New classes","Fixed the plugin for the new class update"]] }; this.patchModules = { @@ -39,13 +39,7 @@ class ReadAllNotificationsButton {
`; this.RANbuttonMarkup = - !BDFDB.DiscordClassModules.HomeIcon.button ? `` : `
+ `
read all
`; @@ -158,8 +152,7 @@ class ReadAllNotificationsButton { let guildseparator = wrapper.querySelector(BDFDB.dotCN.guildseparator); if (guildseparator) { let ranbutton = BDFDB.htmlToElement(this.RANbuttonMarkup); - guildseparator = BDFDB.containsClass(guildseparator.parentElement, BDFDB.disCN.guildouter) ? guildseparator.parentElement : guildseparator; - guildseparator.parentElement.insertBefore(ranbutton, guildseparator); + guildseparator.parentElement.parentElement.insertBefore(ranbutton, guildseparator.parentElement); ranbutton.addEventListener("click", () => { let settings = BDFDB.getAllData(this, "settings"); if (settings.includeGuilds) BDFDB.markGuildAsRead(settings.includeMuted ? BDFDB.readServerList() : BDFDB.readUnreadServerList()); @@ -188,7 +181,7 @@ class ReadAllNotificationsButton { processDirectMessage (instance, wrapper, methodnames) { let ranbutton = document.querySelector(".RANbutton-frame"); let guildseparator = wrapper.parentElement.parentElement.querySelector(BDFDB.dotCN.guildseparator); - if (ranbutton && guildseparator) guildseparator.parentElement.insertBefore(ranbutton, guildseparator); + if (ranbutton && guildseparator) guildseparator.parentElement.parentElement.insertBefore(ranbutton, guildseparator.parentElement); } processRecentMentions (instance, wrapper) { diff --git a/Plugins/ThemeRepo/res/ThemeList.txt b/Plugins/ThemeRepo/res/ThemeList.txt index 5eb8f558a4..1c21ae6206 100644 --- a/Plugins/ThemeRepo/res/ThemeList.txt +++ b/Plugins/ThemeRepo/res/ThemeList.txt @@ -97,8 +97,6 @@ https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Themes/Bl https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Themes/FullThemeDark/FullThemeDark.theme.css https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Themes/ServerColumns/ServerColumns.theme.css https://raw.githubusercontent.com/Mylan719/Discord-light-theme/master/Discord Light-Blue.theme.css -https://raw.githubusercontent.com/Narugokyu/modern-n-cozy/master/modern-n-cozy.theme.css -https://raw.githubusercontent.com/Narugokyu/nova-theme/master/space_nova.theme.css https://raw.githubusercontent.com/NFLD99/Better-Discord/master/Mini_Themes/Avatars.theme.css https://raw.githubusercontent.com/NFLD99/Better-Discord/master/Mini_Themes/Font.theme.css https://raw.githubusercontent.com/NFLD99/Better-Discord/master/Mini_Themes/Make_Names_Clean.theme.css