diff --git a/Plugins/BadgesEverywhere/BadgesEverywhere.plugin.js b/Plugins/BadgesEverywhere/BadgesEverywhere.plugin.js index f44225982d..ec336cd859 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.2";} + getVersion () {return "1.3.3";} getAuthor () {return "DevilBro";} @@ -11,8 +11,8 @@ class BadgesEverywhere { initConstructor () { this.changelog = { - "improved":[["Guild Boost","Changed the general guild boost badge in a way that it's displayed everywhere in all servers and added the option to add the badge for the boosting of the current server"]], - "fixed":[["Message Username","Fixed the issue that moved the message username when a badge was appended"],["Badges","Some badges didn't get added properly"]] + "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"]] }; this.patchModules = { @@ -25,7 +25,7 @@ class BadgesEverywhere { ${BDFDB.dotCNS.message + BDFDB.dotCN.messageheadercozy} { padding-top: 0; } - ${BDFDB.dotCNC.userpopoutheadertagnonickname + BDFDB.dotCNC.userpopoutheadernamewrapper + BDFDB.dotCN.messageheadercozymeta} > span:first-child { + ${BDFDB.dotCN.messageheadercozymeta} > span:first-child { display: inline-flex; } .BE-badge { @@ -45,12 +45,18 @@ class BadgesEverywhere { .BE-badge.BE-badge-popout:not(.BE-badge-CurrentGuildBoost) { top: 3px !important; } + ${BDFDB.dotCN.messageheadercompact} .BE-badge.BE-badge-chat:not(.BE-badge-CurrentGuildBoost) { + top: 3px !important; + } .BE-badge.BE-badge-list.BE-badge-CurrentGuildBoost { top: -2px !important; } .BE-badge.BE-badge-chat.BE-badge-CurrentGuildBoost { top: -3px !important; } + ${BDFDB.dotCN.messageheadercompact} .BE-badge.BE-badge-chat.BE-badge-CurrentGuildBoost { + top: 0px !important; + } .BE-badge:not(.BE-badge-settings):first-of-type { margin-left: 5px !important; } @@ -226,8 +232,7 @@ class BadgesEverywhere { this.addBadges(instance.props.user, wrapper, "list"); } else if (BDFDB.containsClass(wrapper, BDFDB.disCN.userpopoutheadertag) && BDFDB.getData("showInPopout", this, "settings")) { - wrapper = BDFDB.containsClass(wrapper, BDFDB.disCN.userpopoutheadertagwithnickname) && wrapper.previousSibling ? wrapper.previousSibling : wrapper; - this.addBadges(instance.props.user, wrapper, "popout"); + this.addBadges(instance.props.user, BDFDB.getParentEle(BDFDB.dotCN.userpopoutheadertext, wrapper), "popout"); } } @@ -294,6 +299,18 @@ class BadgesEverywhere { badgewrapper.appendChild(badge); badge.addEventListener("mouseenter", () => {BDFDB.createTooltip(settings.showNitroDate ? BDFDB.LanguageStringsFormat("PREMIUM_GUILD_SUBSCRIPTION_TOOLTIP", new Date(member.premiumSince)) : "Boosting current server", badge, {type:"top", style:"white-space: nowrap; max-width: unset"});}); } - if (badgewrapper.firstChild) wrapper.insertBefore(badgewrapper, wrapper.querySelector(".owner-tag,.TRE-tag,svg[name=MobileDevice]")); + if (badgewrapper.firstChild) { + if (header) { + wrapper.insertBefore(badgewrapper, wrapper.querySelector(BDFDB.dotCN.nametag).nextElementSibling); + 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); + popout.style.setProperty("top", (prect.y + prect.height > arect.height ? (arect.height - prect.height) : prect.y) + "px"); + } + } + else { + wrapper.insertBefore(badgewrapper, wrapper.querySelector(".owner-tag,.TRE-tag,svg[name=MobileDevice]")); + } + } } } diff --git a/Plugins/CreationDate/CreationDate.plugin.js b/Plugins/CreationDate/CreationDate.plugin.js index 9579941894..1c6bf0191c 100644 --- a/Plugins/CreationDate/CreationDate.plugin.js +++ b/Plugins/CreationDate/CreationDate.plugin.js @@ -3,7 +3,7 @@ class CreationDate { getName () {return "CreationDate";} - getVersion () {return "1.2.7";} + getVersion () {return "1.2.8";} getAuthor () {return "DevilBro";} @@ -11,7 +11,7 @@ class CreationDate { initConstructor () { this.changelog = { - "fixed":[["New Select Classes","The Dropdown-Select element got new classes on canary, this update will prevent stable from breaking once the class change is pushed to stable"]] + "fixed":[["Order","Fixed order of LastMessageDate, JoinedAtDate, CreationDate"]] }; this.labels = {}; @@ -138,7 +138,7 @@ class CreationDate { if (global.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) { if (this.started) return; BDFDB.loadMessage(this); - + this.languages = Object.assign({"own":{name:"Own",id:"own",integrated:false,dic:false}},BDFDB.languages); BDFDB.WebModules.forceAllUpdates(this); @@ -209,12 +209,10 @@ class CreationDate { if (!info || !container || container.querySelector(".creationDate")) return; let choice = BDFDB.getData("creationDateLang", this, "choices"); let nametag = container.querySelector(BDFDB.dotCN.nametag); - let joinedAtDate = container.querySelector(".joinedAtDate"); - container.insertBefore(BDFDB.htmlToElement(`
${this.labels.createdat_text.replace("{{time}}", this.getTimestamp(this.languages[choice].id, info.createdAt))}
`), joinedAtDate ? joinedAtDate.nextSibling : (nametag ? nametag.nextSibling : null)); - BDFDB.initElements(container.parentElement, this); + container.insertBefore(BDFDB.htmlToElement(`
${this.labels.createdat_text.replace("{{time}}", this.getTimestamp(this.languages[choice].id, info.createdAt))}
`), nametag ? nametag.nextSibling : null); + BDFDB.initElements(container, this); if (popout && popout.style.transform.indexOf("translateY(-1") == -1) { - let arect = BDFDB.getRects(document.querySelector(BDFDB.dotCN.appmount)); - let prect = BDFDB.getRects(popout); + let arect = BDFDB.getRects(document.querySelector(BDFDB.dotCN.appmount)), prect = BDFDB.getRects(popout); popout.style.setProperty("top", (prect.y + prect.height > arect.height ? (arect.height - prect.height) : prect.y) + "px"); } } diff --git a/Plugins/EditUsers/EditUsers.plugin.js b/Plugins/EditUsers/EditUsers.plugin.js index ee2dc15bc6..786a96cbcd 100644 --- a/Plugins/EditUsers/EditUsers.plugin.js +++ b/Plugins/EditUsers/EditUsers.plugin.js @@ -3,7 +3,7 @@ class EditUsers { getName () {return "EditUsers";} - getVersion () {return "3.3.9";} + getVersion () {return "3.4.0";} getAuthor () {return "DevilBro";} @@ -11,7 +11,7 @@ class EditUsers { initConstructor () { this.changelog = { - "fixed":[["Tags","Fixed the issue where tags were bigger than they should be"]] + "fixed":[["Compact Mode","Fixed for compact mode .. who uses this anyways"]] }; this.labels = {}; @@ -44,17 +44,25 @@ class EditUsers { ${BDFDB.dotCNS.message + BDFDB.dotCN.messageheadercozy} { padding-top: 0; } - ${BDFDB.dotCNC.userpopoutheadertagnonickname + BDFDB.dotCNC.userpopoutheadernamewrapper + BDFDB.dotCN.messageheadercozymeta} > span:first-child { + ${BDFDB.dotCN.messageheadercozymeta} > span:first-child { display: inline-flex; } ${BDFDB.dotCN.bottag} { height: 13px; - top: 0px; + top: unset; + bottom: 0px; position: relative; margin: 0 0 0 1ch; } - ${BDFDB.dotCN.messagegroupcompact} ${BDFDB.dotCN.bottag} { + ${BDFDB.dotCNC.userpopoutheaderbottag + BDFDB.dotCN.userpopoutheaderbottagwithnickname} { + bottom: 4px; + } + ${BDFDB.dotCN.userprofilebottag} { + bottom: 3px; + } + ${BDFDB.dotCN.bottagmessagecompact} { margin-right: 6px; + bottom: 3px; }`; this.userContextEntryMarkup = diff --git a/Plugins/JoinedAtDate/JoinedAtDate.plugin.js b/Plugins/JoinedAtDate/JoinedAtDate.plugin.js index 0b722f41db..4bcf5171c2 100644 --- a/Plugins/JoinedAtDate/JoinedAtDate.plugin.js +++ b/Plugins/JoinedAtDate/JoinedAtDate.plugin.js @@ -3,7 +3,7 @@ class JoinedAtDate { getName () {return "JoinedAtDate";} - getVersion () {return "1.1.0";} + getVersion () {return "1.1.1";} getAuthor () {return "DevilBro";} @@ -11,7 +11,7 @@ class JoinedAtDate { initConstructor () { this.changelog = { - "fixed":[["New Select Classes","The Dropdown-Select element got new classes on canary, this update will prevent stable from breaking once the class change is pushed to stable"]] + "fixed":[["Order","Fixed order of LastMessageDate, JoinedAtDate, CreationDate"]] }; this.labels = {}; @@ -220,12 +220,10 @@ class JoinedAtDate { if (document.contains(container)) { let choice = BDFDB.getData("joinedAtDateLang", this, "choices"); let nametag = container.querySelector(BDFDB.dotCN.nametag); - let creationDate = container.querySelector(".creationDate"); - container.insertBefore(BDFDB.htmlToElement(`
${this.labels.joinedat_text.replace("{{time}}", this.getTimestamp(this.languages[choice].id, timestamp))}
`), creationDate ? creationDate : (nametag ? nametag.nextSibling : null)); - BDFDB.initElements(container.parentElement, this); + container.insertBefore(BDFDB.htmlToElement(`
${this.labels.joinedat_text.replace("{{time}}", this.getTimestamp(this.languages[choice].id, timestamp))}
`), nametag ? nametag.nextSibling : null); + BDFDB.initElements(container, this); if (popout && popout.style.transform.indexOf("translateY(-1") == -1) { - let arect = BDFDB.getRects(document.querySelector(BDFDB.dotCN.appmount)); - let prect = BDFDB.getRects(popout); + let arect = BDFDB.getRects(document.querySelector(BDFDB.dotCN.appmount)), prect = BDFDB.getRects(popout); popout.style.setProperty("top", (prect.y + prect.height > arect.height ? (arect.height - prect.height) : prect.y) + "px"); } } diff --git a/Plugins/LastMessageDate/LastMessageDate.plugin.js b/Plugins/LastMessageDate/LastMessageDate.plugin.js index b659ef6f92..d9f61f631a 100644 --- a/Plugins/LastMessageDate/LastMessageDate.plugin.js +++ b/Plugins/LastMessageDate/LastMessageDate.plugin.js @@ -3,7 +3,7 @@ class LastMessageDate { getName () {return "LastMessageDate";} - getVersion () {return "1.0.4";} + getVersion () {return "1.0.5";} getAuthor () {return "DevilBro";} @@ -11,7 +11,7 @@ class LastMessageDate { initConstructor () { this.changelog = { - "fixed":[["New Select Classes","The Dropdown-Select element got new classes on canary, this update will prevent stable from breaking once the class change is pushed to stable"]] + "fixed":[["Order","Fixed order of LastMessageDate, JoinedAtDate, CreationDate"]] }; this.labels = {}; @@ -229,12 +229,10 @@ class LastMessageDate { if (document.contains(container)) { let choice = BDFDB.getData("lastMessageDateLang", this, "choices"); let nametag = container.querySelector(BDFDB.dotCN.nametag); - let joinedAtDate = container.querySelector(".joinedAtDate"); - container.insertBefore(BDFDB.htmlToElement(`
${this.labels.lastmessage_text.replace("{{time}}", timestamp == "never" ? "---" : this.getTimestamp(this.languages[choice].id, timestamp))}
`), joinedAtDate ? joinedAtDate.nextSibling : (nametag ? nametag.nextSibling : null)); - BDFDB.initElements(container.parentElement, this); + container.insertBefore(BDFDB.htmlToElement(`
${this.labels.lastmessage_text.replace("{{time}}", timestamp == "never" ? "---" : this.getTimestamp(this.languages[choice].id, timestamp))}
`), nametag ? nametag.nextSibling : null); + BDFDB.initElements(container, this); if (popout && popout.style.transform.indexOf("translateY(-1") == -1) { - let arect = BDFDB.getRects(document.querySelector(BDFDB.dotCN.appmount)); - let prect = BDFDB.getRects(popout); + let arect = BDFDB.getRects(document.querySelector(BDFDB.dotCN.appmount)), prect = BDFDB.getRects(popout); popout.style.setProperty("top", (prect.y + prect.height > arect.height ? (arect.height - prect.height) : prect.y) + "px"); } }