This commit is contained in:
Mirco Wittrien 2020-03-21 19:05:11 +01:00
parent 2728823127
commit 21eef6c6d7
4 changed files with 15 additions and 16 deletions

View File

@ -7,7 +7,7 @@ var BadgesEverywhere = (_ => {
return class BadgesEverywhere {
getName () {return "BadgesEverywhere";}
getVersion () {return "1.5.3";}
getVersion () {return "1.5.4";}
getAuthor () {return "DevilBro";}
@ -15,7 +15,7 @@ var BadgesEverywhere = (_ => {
constructor () {
this.changelog = {
"fixed":[["Compact","Added a margin to add some spaces between badges and the message in compact mode"]]
"fixed":[["Messages Popout","Now works in popouts like the recent mentions popout"]]
};
this.patchedModules = {
@ -250,7 +250,7 @@ var BadgesEverywhere = (_ => {
processMessageHeader (e) {
if (e.instance.props.message && BDFDB.DataUtils.get(this, "settings", "showInChat")) {
let [children, index] = BDFDB.ReactUtils.findChildren(e.returnvalue.props.children.slice(1), {name: "Popout"});
let [children, index] = BDFDB.ReactUtils.findChildren(e.returnvalue.props.children.slice(1), {name: "Popout", props: [["className", BDFDB.disCN.messageusername]]});
if (index > -1) this.injectBadges(e.instance, children, e.instance.props.message.author, "chat");
}
}

View File

@ -4,7 +4,7 @@ var EditUsers = (_ => {
return class EditUsers {
getName () {return "EditUsers";}
getVersion () {return "3.8.0";}
getVersion () {return "3.8.1";}
getAuthor () {return "DevilBro";}
@ -12,7 +12,7 @@ var EditUsers = (_ => {
constructor () {
this.changelog = {
"fixed":[["Avatars","Fixed avatars not being changed in some places"]]
"fixed":[["Messages Popout","Now works in popouts like the recent mentions popout"]]
};
this.patchedModules = {
@ -71,7 +71,7 @@ var EditUsers = (_ => {
initConstructor () {
this.css = `
${BDFDB.dotCN.messageusername}:hover > span[style*="color"] {
${BDFDB.dotCNS.chat + BDFDB.dotCN.messageusername}:hover > span[style*="color"] {
text-decoration: underline;
}
${BDFDB.dotCN.dmchannel}:hover ${BDFDB.dotCN.namecontainername} span[style*="color"] {
@ -506,11 +506,11 @@ var EditUsers = (_ => {
processMessageHeader (e) {
if (e.instance.props.message && BDFDB.DataUtils.get(this, "settings", "changeInChatWindow")) {
let [children, index] = BDFDB.ReactUtils.findChildren(e.returnvalue.props.children.slice(1), {name: "Popout"});
let [children, index] = BDFDB.ReactUtils.findChildren(e.returnvalue.props.children.slice(1), {name: "Popout", props: [["className", BDFDB.disCN.messageusername]]});
if (index > -1) {
let data = BDFDB.DataUtils.load(this, "users", e.instance.props.message.author.id);
if (data && (data.color1 || data.color2)) {
if (children[index] && children[index].props && typeof children[index].props.children == "function") {
if (children[index].props && typeof children[index].props.children == "function") {
let renderChildren = children[index].props.children;
children[index].props.children = (...args) => {
let renderedChildren = renderChildren(...args);
@ -518,6 +518,7 @@ var EditUsers = (_ => {
return renderedChildren;
}
}
else this.changeUserColor(children[index], e.instance.props.message.author.id);
}
this.injectBadge(children, e.instance.props.message.author.id, (BDFDB.LibraryModules.ChannelStore.getChannel(e.instance.props.message.channel_id) || {}).guild_id, 2, e.instance.props.compact ? BDFDB.disCN.messagebottagcompact : BDFDB.disCN.messagebottagcozy);
}

View File

@ -4,7 +4,7 @@ var OwnerTag = (_ => {
return class OwnerTag {
getName () {return "OwnerTag";}
getVersion () {return "1.2.6";}
getVersion () {return "1.2.7";}
getAuthor () {return "DevilBro";}
@ -12,8 +12,7 @@ var OwnerTag = (_ => {
constructor () {
this.changelog = {
"fixed":[["Message Update","Fixed the plugin for the new Message Update"]],
"improved":[["New Library Structure & React","Restructured my Library and switched to React rendering instead of DOM manipulation"]]
"fixed":[["Messages Popout","Now works in popouts like the recent mentions popout"]]
};
this.patchedModules = {
@ -165,7 +164,7 @@ var OwnerTag = (_ => {
if (e.instance.props.message && BDFDB.DataUtils.get(this, "settings", "addInChatWindow")) {
let usertype = this.getUserType(e.instance.props.message.author);
if (usertype) {
let [children, index] = BDFDB.ReactUtils.findChildren(e.returnvalue.props.children.slice(1), {name: "Popout"});
let [children, index] = BDFDB.ReactUtils.findChildren(e.returnvalue.props.children.slice(1), {name: "Popout", props: [["className", BDFDB.disCN.messageusername]]});
if (index > -1) this.injectOwnerTag(children, e.instance.props.message.author, usertype, e.instance.props.compact ? 0 : 2, e.instance.props.compact ? BDFDB.disCN.messagebottagcompact : BDFDB.disCN.messagebottagcozy);
}
}

View File

@ -4,7 +4,7 @@ var TopRoleEverywhere = (_ => {
return class TopRoleEverywhere {
getName () {return "TopRoleEverywhere";}
getVersion () {return "2.9.7";}
getVersion () {return "2.9.8";}
getAuthor () {return "DevilBro";}
@ -12,8 +12,7 @@ var TopRoleEverywhere = (_ => {
constructor () {
this.changelog = {
"fixed":[["Message Update","Fixed the plugin for the new Message Update"]],
"improved":[["New Library Structure & React","Restructured my Library and switched to React rendering instead of DOM manipulation"]]
"fixed":[["Messages Popout","Now works in popouts like the recent mentions popout"]]
};
this.patchedModules = {
@ -156,7 +155,7 @@ var TopRoleEverywhere = (_ => {
processMessageHeader (e) {
if (e.instance.props.message && BDFDB.DataUtils.get(this, "settings", "showInChat")) {
let [children, index] = BDFDB.ReactUtils.findChildren(e.returnvalue.props.children.slice(1), {name: "Popout"});
let [children, index] = BDFDB.ReactUtils.findChildren(e.returnvalue.props.children.slice(1), {name: "Popout", props: [["className", BDFDB.disCN.messageusername]]});
if (index > -1) this.injectRoleTag(children, e.instance.props.message.author, "chat", e.instance.props.compact ? BDFDB.disCN.messagebottagcompact : BDFDB.disCN.messagebottagcozy);
}
}