fixes
This commit is contained in:
parent
308fb60179
commit
9495bc3f75
|
@ -3,7 +3,7 @@
|
|||
class BadgesEverywhere {
|
||||
getName () {return "BadgesEverywhere";}
|
||||
|
||||
getVersion () {return "1.4.7";}
|
||||
getVersion () {return "1.4.8";}
|
||||
|
||||
getAuthor () {return "DevilBro";}
|
||||
|
||||
|
@ -11,6 +11,7 @@ class BadgesEverywhere {
|
|||
|
||||
constructor () {
|
||||
this.changelog = {
|
||||
"fixed":[["Chat","Elements now properly get added to the chat again"]],
|
||||
"improved":[["New Library Structure & React","Restructured my Library and switched to React rendering instead of DOM manipulation"]]
|
||||
};
|
||||
|
||||
|
@ -229,8 +230,13 @@ class BadgesEverywhere {
|
|||
|
||||
processMessageUsername (e) {
|
||||
let user = BDFDB.ReactUtils.getValue(e.instance, "props.message.author");
|
||||
if (user && BDFDB.DataUtils.get(this, "settings", "showInChat")) {
|
||||
this.injectBadges(e.instance, BDFDB.ReactUtils.getValue(e.returnvalue, "props.children.props.children"), user, "chat");
|
||||
if (user && typeof e.returnvalue.props.children == "function" && BDFDB.DataUtils.get(this, "settings", "showInChat")) {
|
||||
let renderChildren = e.returnvalue.props.children;
|
||||
e.returnvalue.props.children = () => {
|
||||
let renderedChildren = renderChildren(e.instance);
|
||||
this.injectBadges(e.instance, renderedChildren.props.children, user, "chat");
|
||||
return renderedChildren;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
class OwnerTag {
|
||||
getName () {return "OwnerTag";}
|
||||
|
||||
getVersion () {return "1.1.9";}
|
||||
getVersion () {return "1.2.0";}
|
||||
|
||||
getAuthor () {return "DevilBro";}
|
||||
|
||||
|
@ -11,6 +11,7 @@ class OwnerTag {
|
|||
|
||||
constructor () {
|
||||
this.changelog = {
|
||||
"fixed":[["Chat","Elements now properly get added to the chat again"]],
|
||||
"improved":[["New Library Structure & React","Restructured my Library and switched to React rendering instead of DOM manipulation"]]
|
||||
};
|
||||
|
||||
|
@ -149,8 +150,13 @@ class OwnerTag {
|
|||
processMessageUsername (e) {
|
||||
let user = BDFDB.ReactUtils.getValue(e.instance, "props.message.author");
|
||||
let usertype = this.getUserType(user);
|
||||
if (usertype && BDFDB.DataUtils.get(this, "settings", "addInChatWindow")) {
|
||||
this.injectOwnerTag(BDFDB.ReactUtils.getValue(e.returnvalue, "props.children.props.children"), user, usertype, 2, e.instance.props.isCompact ? BDFDB.disCN.bottagmessagecompact : BDFDB.disCN.bottagmessagecozy);
|
||||
if (usertype && user && typeof e.returnvalue.props.children == "function" && BDFDB.DataUtils.get(this, "settings", "addInChatWindow")) {
|
||||
let renderChildren = e.returnvalue.props.children;
|
||||
e.returnvalue.props.children = () => {
|
||||
let renderedChildren = renderChildren(e.instance);
|
||||
this.injectOwnerTag(BDFDB.ReactUtils.getValue(e.returnvalue, renderedChildren.props.children), user, usertype, 2, e.instance.props.isCompact ? BDFDB.disCN.bottagmessagecompact : BDFDB.disCN.bottagmessagecozy);
|
||||
return renderedChildren;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
class TopRoleEverywhere {
|
||||
getName () {return "TopRoleEverywhere";}
|
||||
|
||||
getVersion () {return "2.9.1";}
|
||||
getVersion () {return "2.9.2";}
|
||||
|
||||
getAuthor () {return "DevilBro";}
|
||||
|
||||
|
@ -11,6 +11,7 @@ class TopRoleEverywhere {
|
|||
|
||||
constructor () {
|
||||
this.changelog = {
|
||||
"fixed":[["Chat","Elements now properly get added to the chat again"]],
|
||||
"improved":[["New Library Structure & React","Restructured my Library and switched to React rendering instead of DOM manipulation"]]
|
||||
};
|
||||
|
||||
|
@ -148,8 +149,13 @@ class TopRoleEverywhere {
|
|||
|
||||
processMessageUsername (e) {
|
||||
let user = BDFDB.ReactUtils.getValue(e.instance, "props.message.author");
|
||||
if (user && BDFDB.DataUtils.get(this, "settings", "showInChat")) {
|
||||
this.injectRoleTag(BDFDB.ReactUtils.getValue(e.returnvalue, "props.children.props.children"), user, "chat", e.instance.props.isCompact ? BDFDB.disCN.bottagmessagecompact : BDFDB.disCN.bottagmessagecozy);
|
||||
if (user && typeof e.returnvalue.props.children == "function" && BDFDB.DataUtils.get(this, "settings", "showInChat")) {
|
||||
let renderChildren = e.returnvalue.props.children;
|
||||
e.returnvalue.props.children = () => {
|
||||
let renderedChildren = renderChildren(e.instance);
|
||||
this.injectRoleTag(BDFDB.ReactUtils.getValue(e.returnvalue, renderedChildren.props.children, user, "chat", e.instance.props.isCompact ? BDFDB.disCN.bottagmessagecompact : BDFDB.disCN.bottagmessagecozy);
|
||||
return renderedChildren;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue