Revert "stuff"

This reverts commit 4aea853b01.
This commit is contained in:
Mirco Wittrien 2020-10-07 10:14:21 +02:00
parent 8701cd073c
commit 5dae1ef72f
3 changed files with 9 additions and 23 deletions

View File

@ -7,11 +7,6 @@ module.exports = (_ => {
"author": "DevilBro",
"version": "1.6.0",
"description": "Displays Badges (Nitro, HypeSquad, etc...) in the chat/memberlist/userpopout."
},
"changeLog": {
"fixed": {
"Chat": "Works again in chat"
}
}
};
return !window.BDFDB_Global || (!window.BDFDB_Global.loaded && !window.BDFDB_Global.started) ? class {
@ -379,8 +374,8 @@ module.exports = (_ => {
processMessageHeader (e) {
if (e.instance.props.message && settings.showInChat) {
let headerText = BDFDB.ReactUtils.findChild(e.returnvalue.props.children, {props: [["className", BDFDB.disCN.messageheadertext]]});
if (headerText && headerText.props && headerText.props.children) this.injectBadges(e.instance, headerText.props.children && headerText.props.children.props ? headerText.props.children.props.children : headerText.props.children, e.instance.props.message.author, "chat");
let [children, index] = BDFDB.ReactUtils.findParent(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

@ -7,11 +7,6 @@ module.exports = (_ => {
"author": "DevilBro",
"version": "1.3.3",
"description": "Adds a tag or crown to the server owner (or admins/management)."
},
"changeLog": {
"fixed": {
"Chat": "Works again in chat"
}
}
};
return !window.BDFDB_Global || (!window.BDFDB_Global.loaded && !window.BDFDB_Global.started) ? class {
@ -195,8 +190,8 @@ module.exports = (_ => {
if (e.instance.props.message && settings.addInChatWindow) {
let userType = this.getUserType(e.instance.props.message.author, e.instance.props.message.channel_id);
if (userType) {
let headerText = BDFDB.ReactUtils.findChild(e.returnvalue.props.children, {props: [["className", BDFDB.disCN.messageheadertext]]});
if (headerText && headerText.props && headerText.props.children) this.injectOwnerTag(headerText.props.children && headerText.props.children.props ? headerText.props.children.props.children : headerText.props.children, e.instance.props.message.author, userType, e.instance.props.compact ? 0 : 2, {
let [children, index] = BDFDB.ReactUtils.findParent(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, {
tagClass: e.instance.props.compact ? BDFDB.disCN.messagebottagcompact : BDFDB.disCN.messagebottagcozy,
useRem: true
});

View File

@ -7,11 +7,6 @@ module.exports = (_ => {
"author": "DevilBro",
"version": "3.0.3",
"description": "Adds the highest role of a user as a tag."
},
"changeLog": {
"fixed": {
"Chat": "Works again in chat"
}
}
};
return !window.BDFDB_Global || (!window.BDFDB_Global.loaded && !window.BDFDB_Global.started) ? class {
@ -94,7 +89,6 @@ module.exports = (_ => {
}
${BDFDB.dotCNS.messagecompact + BDFDB.dotCNS.messageheader + BDFDB.dotCN._toproleseverywhererolestyle} {
margin-right: 0.3rem;
text-indent: 0;
}
${BDFDB.dotCN._toproleseverywhererolestyle} {
display: inline-flex;
@ -103,6 +97,9 @@ module.exports = (_ => {
${BDFDB.dotCNS._toproleseverywhererolestyle + BDFDB.dotCN.userpopoutrolecircle} {
flex: 0 0 auto;
}
${BDFDB.dotCNS.messagecompact + BDFDB.dotCNS.messageheader + BDFDB.dotCN._toproleseverywhererolestyle} {
text-indent: 0;
}
`;
}
@ -167,9 +164,8 @@ module.exports = (_ => {
processMessageHeader (e) {
if (e.instance.props.message) {
let headerText = BDFDB.ReactUtils.findChild(e.returnvalue.props.children, {props: [["className", BDFDB.disCN.messageheadertext]]});
if (headerText && headerText.props && headerText.props.children) {
let children = headerText.props.children && headerText.props.children.props ? headerText.props.children.props.children : headerText.props.children;
let [children, index] = BDFDB.ReactUtils.findParent(e.returnvalue.props.children.slice(1), {name: "Popout", props: [["className", BDFDB.disCN.messageusername]]});
if (index > -1) {
if (settings.showInChat) this.injectRoleTag(children, e.instance.props.message.author, "chat", {
tagClass: e.instance.props.compact ? BDFDB.disCN.messagebottagcompact : BDFDB.disCN.messagebottagcozy,
useRem: true