From ea6299a76e2772f818e4423494a5d7bbe620fc00 Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Thu, 11 Oct 2018 21:13:27 +0200 Subject: [PATCH] BugFixes --- Plugins/BadgesEverywhere/BadgesEverywhere.plugin.js | 4 +++- Plugins/TopRoleEverywhere/TopRoleEverywhere.plugin.js | 8 ++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Plugins/BadgesEverywhere/BadgesEverywhere.plugin.js b/Plugins/BadgesEverywhere/BadgesEverywhere.plugin.js index 34c0c9d8cd..f99475fdea 100644 --- a/Plugins/BadgesEverywhere/BadgesEverywhere.plugin.js +++ b/Plugins/BadgesEverywhere/BadgesEverywhere.plugin.js @@ -30,6 +30,7 @@ class BadgesEverywhere { .BE-badge-HypeSquadBravery {width:17px;min-width:17px;} .BE-badge-HypeSquadBrilliance {width:17px;min-width:17px;} .BE-badge-HypeSquadBalance {width:17px;min-width:17px;} + .BE-badge-EarlySupporter {width:24px;min-width:24px;} .BE-badge-Nitro {width:21px;min-width:21px;}`; this.loading = false; @@ -46,6 +47,7 @@ class BadgesEverywhere { 64: {name:"HypeSquad Bravery", implemented:true, white:"url(https://discordapp.com/assets/1115767aed344e96a27a12e97718c171.svg)", color:"url(https://discordapp.com/assets/64ae1208b6aefc0a0c3681e6be36f0ff.svg)"}, 128: {name:"HypeSquad Brilliance", implemented:true, white:"url(https://discordapp.com/assets/48cf0556d93901c8cb16317be2436523.svg)", color:"url(https://discordapp.com/assets/48cf0556d93901c8cb16317be2436523.svg)"}, 256: {name:"HypeSquad Balance", implemented:true, white:"url(https://discordapp.com/assets/2a085ed9c86f3613935a6a8667ba8b89.svg)", color:"url(https://discordapp.com/assets/9fdc63ef8a3cc1617c7586286c34e4f1.svg)"}, + 512: {name:"Early Supporter", implemented:true, white:"url(https://discordapp.com/assets/ce15562552e3d70c56d5408cfeed2ffd.svg)", color:"url(https://discordapp.com/assets/23e59d799436a73c024819f84ea0b627.svg)"}, 2048: {name:"Nitro", implemented:true, white:"url(https://discordapp.com/assets/379d2b3171722ef8be494231234da5d1.svg)", color:"url(https://discordapp.com/assets/386884eecd36164487505ddfbac35a9d.svg)"} }; @@ -66,7 +68,7 @@ class BadgesEverywhere { getDescription () {return "Displays Badges (Nitro, HypeSquad, etc...) in the chat/memberlist/userpopout. Thanks for Zerebos' help.";} - getVersion () {return "1.0.9";} + getVersion () {return "1.1.0";} getAuthor () {return "DevilBro";} diff --git a/Plugins/TopRoleEverywhere/TopRoleEverywhere.plugin.js b/Plugins/TopRoleEverywhere/TopRoleEverywhere.plugin.js index 12dd8e1d61..e93003ea56 100644 --- a/Plugins/TopRoleEverywhere/TopRoleEverywhere.plugin.js +++ b/Plugins/TopRoleEverywhere/TopRoleEverywhere.plugin.js @@ -45,7 +45,7 @@ class TopRoleEverywhere { getDescription () {return "Adds the highest role of a user as a tag.";} - getVersion () {return "2.7.1";} + getVersion () {return "2.7.2";} getAuthor () {return "DevilBro";} @@ -101,7 +101,7 @@ class TopRoleEverywhere { (change, i) => { if (change.addedNodes) { change.addedNodes.forEach((node) => { - if (node && node.querySelector(BDFDB.dotCN.memberusername) && BDFDB.getData("showInMemberList", this, "settings")) { + if (node.tagName && node.querySelector(BDFDB.dotCN.memberusername) && BDFDB.getData("showInMemberList", this, "settings")) { this.addRoleTag(node, "list", false); } }); @@ -109,7 +109,7 @@ class TopRoleEverywhere { } ); }); - BDFDB.addObserver(this, BDFDB.dotCN.members, {name:"userListObserver",instance:observer}, {childList:true}); + BDFDB.addObserver(this, BDFDB.dotCN.memberswrap, {name:"userListObserver",instance:observer}, {childList:true, subtree:true}); observer = new MutationObserver((changes, _) => { changes.forEach( @@ -161,7 +161,7 @@ class TopRoleEverywhere { onSwitch () { if (typeof BDFDB === "object") { - BDFDB.addObserver(this, BDFDB.dotCN.members, {name:"userListObserver"}, {childList:true}); + BDFDB.addObserver(this, BDFDB.dotCN.memberswrap, {name:"userListObserver"}, {childList:true, subtree:true}); BDFDB.addObserver(this, BDFDB.dotCN.messages, {name:"chatWindowObserver"}, {childList:true, subtree:true}); this.loadRoleTags(); }