This commit is contained in:
Mirco Wittrien 2019-05-12 09:33:50 +02:00
parent d3234e09fe
commit 148606549e
3 changed files with 10 additions and 3 deletions

View File

@ -3,13 +3,17 @@
class BadgesEverywhere {
getName () {return "BadgesEverywhere";}
getVersion () {return "1.2.3";}
getVersion () {return "1.2.4";}
getAuthor () {return "DevilBro";}
getDescription () {return "Displays Badges (Nitro, HypeSquad, etc...) in the chat/memberlist/userpopout. Thanks for Zerebos' help.";}
initConstructor () {
this.changelog = {
"fixed":[["Icons","Fixed the issue where the badge image wouldn't be contained within the badge"]]
};
this.patchModules = {
"NameTag":"componentDidMount",
"MessageUsername":"componentDidMount",
@ -18,6 +22,9 @@ class BadgesEverywhere {
this.css = `
.BE-badge {
background-size: contain;
background-position: center;
background-repeat: no-repeat;
display: inline-block;
height: 17px !important;
margin: 0 2px !important;

View File

@ -197,7 +197,7 @@ class JoinedAtDate {
}
addJoinedAtDate (info, container, popout) {
if (!info || !container || container.querySelector(".joinedAtDate")) return;
if (!info || info.discriminator == "0000" || !container || container.querySelector(".joinedAtDate")) return;
let guildid = this.CurrentGuildStore.getGuildId();
if (guildid) {
if (!this.loadedusers[guildid]) this.loadedusers[guildid] = {};

View File

@ -204,7 +204,7 @@ class LastMessageDate {
}
addLastMessageDate (info, container, popout) {
if (!info || info.isLocalBot() || !container || container.querySelector(".lastMessageDate")) return;
if (!info || info.discriminator == "0000" || !container || container.querySelector(".lastMessageDate")) return;
let guildid = this.CurrentGuildStore.getGuildId();
let isguild = !!guildid;
guildid = guildid || this.CurrentChannelStore.getChannelId();