From 90bb5b1441a6c2d22f58c0ab5c811946770a4a22 Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Thu, 20 Jun 2019 10:47:01 +0200 Subject: [PATCH] Update BadgesEverywhere.plugin.js --- Plugins/BadgesEverywhere/BadgesEverywhere.plugin.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Plugins/BadgesEverywhere/BadgesEverywhere.plugin.js b/Plugins/BadgesEverywhere/BadgesEverywhere.plugin.js index ec336cd859..e207337517 100644 --- a/Plugins/BadgesEverywhere/BadgesEverywhere.plugin.js +++ b/Plugins/BadgesEverywhere/BadgesEverywhere.plugin.js @@ -3,7 +3,7 @@ class BadgesEverywhere { getName () {return "BadgesEverywhere";} - getVersion () {return "1.3.3";} + getVersion () {return "1.3.4";} getAuthor () {return "DevilBro";} @@ -11,8 +11,7 @@ class BadgesEverywhere { initConstructor () { this.changelog = { - "improved":[["Compact Mode","Changed badge placement in user popout to look more like the user profile and to fix issues with long nicknames"]], - "fixed":[["Compact Mode","Fixed for compact mode .. who uses this anyways"]] + "fixed":[["Showing at the bottom","Badges are now properlly at the bottom even when a custom status is set"]] }; this.patchModules = { @@ -28,6 +27,10 @@ class BadgesEverywhere { ${BDFDB.dotCN.messageheadercozymeta} > span:first-child { display: inline-flex; } + ${BDFDB.dotCN.userpopoutcustomstatus}:not(:last-child) { + margin-top: 4px; + margin-bottom: 4px; + } .BE-badge { position: relative; background-size: contain; @@ -279,7 +282,7 @@ class BadgesEverywhere { let indicators = BDFDB.getAllData(this, "indicators"); let settings = BDFDB.getAllData(this, "settings"); let header = BDFDB.getParentEle(BDFDB.dotCN.userpopoutheader, wrapper); - let badgewrapper = BDFDB.htmlToElement(``); + let badgewrapper = BDFDB.htmlToElement(``); for (let flag in this.defaults.badges) { if ((this.loadedusers[info.id].flags | flag) == this.loadedusers[info.id].flags && badges[flag]) { let badge = BDFDB.htmlToElement(`
`); @@ -301,7 +304,7 @@ class BadgesEverywhere { } if (badgewrapper.firstChild) { if (header) { - wrapper.insertBefore(badgewrapper, wrapper.querySelector(BDFDB.dotCN.nametag).nextElementSibling); + header.firstElementChild.appendChild(badgewrapper); let popout = header.parentElement.parentElement; if (popout.style.transform.indexOf("translateY(-1") == -1) { let arect = BDFDB.getRects(document.querySelector(BDFDB.dotCN.appmount)), prect = BDFDB.getRects(popout);