This commit is contained in:
Mirco Wittrien 2019-11-17 12:34:38 +01:00
parent 3845a3b2d6
commit 02e022fa66
8 changed files with 19 additions and 19 deletions

View File

@ -3,7 +3,7 @@
class BadgesEverywhere { class BadgesEverywhere {
getName () {return "BadgesEverywhere";} getName () {return "BadgesEverywhere";}
getVersion () {return "1.4.7";} getVersion () {return "1.4.9";}
getAuthor () {return "DevilBro";} getAuthor () {return "DevilBro";}
@ -232,8 +232,8 @@ class BadgesEverywhere {
let user = BDFDB.ReactUtils.getValue(e.instance, "props.message.author"); let user = BDFDB.ReactUtils.getValue(e.instance, "props.message.author");
if (user && typeof e.returnvalue.props.children == "function" && BDFDB.DataUtils.get(this, "settings", "showInChat")) { if (user && typeof e.returnvalue.props.children == "function" && BDFDB.DataUtils.get(this, "settings", "showInChat")) {
let renderChildren = e.returnvalue.props.children; let renderChildren = e.returnvalue.props.children;
e.returnvalue.props.children = () => { e.returnvalue.props.children = (...args) => {
let renderedChildren = renderChildren(e.instance); let renderedChildren = renderChildren(...args);
this.injectBadges(e.instance, renderedChildren.props.children, user, "chat"); this.injectBadges(e.instance, renderedChildren.props.children, user, "chat");
return renderedChildren; return renderedChildren;
}; };

View File

@ -239,8 +239,8 @@ class CompleteTimestamps {
if (typeof e.returnvalue.props.children == "function") { if (typeof e.returnvalue.props.children == "function") {
let settings = BDFDB.DataUtils.get(this, "settings"); let settings = BDFDB.DataUtils.get(this, "settings");
let renderChildren = e.returnvalue.props.children; let renderChildren = e.returnvalue.props.children;
e.returnvalue.props.children = () => { e.returnvalue.props.children = (...args) => {
let renderedChildren = renderChildren(e.instance); let renderedChildren = renderChildren(...args);
if (e.instance.props.isCompact && settings.showInChat) this.injectTimestamp(renderedChildren, e.instance.props); if (e.instance.props.isCompact && settings.showInChat) this.injectTimestamp(renderedChildren, e.instance.props);
if (settings.changeForEdit) this.injectEditStamp(renderedChildren, e.instance.props); if (settings.changeForEdit) this.injectEditStamp(renderedChildren, e.instance.props);
return renderedChildren; return renderedChildren;

View File

@ -232,8 +232,8 @@ class CreationDate {
processAnalyticsContext (e) { processAnalyticsContext (e) {
if (typeof e.returnvalue.props.children == "function" && e.instance.props.section == "Profile Modal" && BDFDB.DataUtils.get(this, "settings", "addInUserProfil")) { if (typeof e.returnvalue.props.children == "function" && e.instance.props.section == "Profile Modal" && BDFDB.DataUtils.get(this, "settings", "addInUserProfil")) {
let renderChildren = e.returnvalue.props.children; let renderChildren = e.returnvalue.props.children;
e.returnvalue.props.children = () => { e.returnvalue.props.children = (...args) => {
let renderedChildren = renderChildren(e.instance); let renderedChildren = renderChildren(...args);
let [children, index] = BDFDB.ReactUtils.findChildren(renderedChildren, {name: "DiscordTag"}); let [children, index] = BDFDB.ReactUtils.findChildren(renderedChildren, {name: "DiscordTag"});
if (index > -1) this.injectDate(children, 1, children[index].props.user); if (index > -1) this.injectDate(children, 1, children[index].props.user);
return renderedChildren; return renderedChildren;

View File

@ -234,8 +234,8 @@ class JoinedAtDate {
processAnalyticsContext (e) { processAnalyticsContext (e) {
if (typeof e.returnvalue.props.children == "function" && e.instance.props.section == "Profile Modal" && BDFDB.DataUtils.get(this, "settings", "addInUserProfil")) { if (typeof e.returnvalue.props.children == "function" && e.instance.props.section == "Profile Modal" && BDFDB.DataUtils.get(this, "settings", "addInUserProfil")) {
let renderChildren = e.returnvalue.props.children; let renderChildren = e.returnvalue.props.children;
e.returnvalue.props.children = () => { e.returnvalue.props.children = (...args) => {
let renderedChildren = renderChildren(e.instance); let renderedChildren = renderChildren(...args);
let [children, index] = BDFDB.ReactUtils.findChildren(renderedChildren, {name: "DiscordTag"}); let [children, index] = BDFDB.ReactUtils.findChildren(renderedChildren, {name: "DiscordTag"});
if (index > -1) this.injectDate(e.instance, children, 1, children[index].props.user); if (index > -1) this.injectDate(e.instance, children, 1, children[index].props.user);
return renderedChildren; return renderedChildren;

View File

@ -241,8 +241,8 @@ class LastMessageDate {
processAnalyticsContext (e) { processAnalyticsContext (e) {
if (typeof e.returnvalue.props.children == "function" && e.instance.props.section == "Profile Modal" && BDFDB.DataUtils.get(this, "settings", "addInUserProfil")) { if (typeof e.returnvalue.props.children == "function" && e.instance.props.section == "Profile Modal" && BDFDB.DataUtils.get(this, "settings", "addInUserProfil")) {
let renderChildren = e.returnvalue.props.children; let renderChildren = e.returnvalue.props.children;
e.returnvalue.props.children = () => { e.returnvalue.props.children = (...args) => {
let renderedChildren = renderChildren(e.instance); let renderedChildren = renderChildren(...args);
let [children, index] = BDFDB.ReactUtils.findChildren(renderedChildren, {name: "DiscordTag"}); let [children, index] = BDFDB.ReactUtils.findChildren(renderedChildren, {name: "DiscordTag"});
if (index > -1) this.injectDate(e.instance, children, 1, children[index].props.user); if (index > -1) this.injectDate(e.instance, children, 1, children[index].props.user);
return renderedChildren; return renderedChildren;

View File

@ -3,7 +3,7 @@
class OwnerTag { class OwnerTag {
getName () {return "OwnerTag";} getName () {return "OwnerTag";}
getVersion () {return "1.1.9";} getVersion () {return "1.2.1";}
getAuthor () {return "DevilBro";} getAuthor () {return "DevilBro";}
@ -152,8 +152,8 @@ class OwnerTag {
let usertype = this.getUserType(user); let usertype = this.getUserType(user);
if (usertype && user && typeof e.returnvalue.props.children == "function" && BDFDB.DataUtils.get(this, "settings", "addInChatWindow")) { if (usertype && user && typeof e.returnvalue.props.children == "function" && BDFDB.DataUtils.get(this, "settings", "addInChatWindow")) {
let renderChildren = e.returnvalue.props.children; let renderChildren = e.returnvalue.props.children;
e.returnvalue.props.children = () => { e.returnvalue.props.children = (...args) => {
let renderedChildren = renderChildren(e.instance); let renderedChildren = renderChildren(...args);
this.injectOwnerTag(renderedChildren.props.children, user, usertype, 2, e.instance.props.isCompact ? BDFDB.disCN.bottagmessagecompact : BDFDB.disCN.bottagmessagecozy); this.injectOwnerTag(renderedChildren.props.children, user, usertype, 2, e.instance.props.isCompact ? BDFDB.disCN.bottagmessagecompact : BDFDB.disCN.bottagmessagecozy);
return renderedChildren; return renderedChildren;
}; };

View File

@ -142,8 +142,8 @@ class ShowImageDetails {
let settings = BDFDB.DataUtils.get(this, "settings"); let settings = BDFDB.DataUtils.get(this, "settings");
let amounts = BDFDB.DataUtils.get(this, "amounts"); let amounts = BDFDB.DataUtils.get(this, "amounts");
let renderChildren = e.returnvalue.props.children; let renderChildren = e.returnvalue.props.children;
e.returnvalue.props.children = () => { e.returnvalue.props.children = (...args) => {
let renderedChildren = renderChildren(e.instance); let renderedChildren = renderChildren(...args);
if (settings.showOnHover) return BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.TooltipContainer, { if (settings.showOnHover) return BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.TooltipContainer, {
text: `${attachment.filename}\n${BDFDB.NumberUtils.formatBytes(attachment.size)}\n${attachment.width}x${attachment.height}px`, text: `${attachment.filename}\n${BDFDB.NumberUtils.formatBytes(attachment.size)}\n${attachment.width}x${attachment.height}px`,
tooltipConfig: { tooltipConfig: {

View File

@ -3,7 +3,7 @@
class TopRoleEverywhere { class TopRoleEverywhere {
getName () {return "TopRoleEverywhere";} getName () {return "TopRoleEverywhere";}
getVersion () {return "2.9.1";} getVersion () {return "2.9.3";}
getAuthor () {return "DevilBro";} getAuthor () {return "DevilBro";}
@ -151,8 +151,8 @@ class TopRoleEverywhere {
let user = BDFDB.ReactUtils.getValue(e.instance, "props.message.author"); let user = BDFDB.ReactUtils.getValue(e.instance, "props.message.author");
if (user && typeof e.returnvalue.props.children == "function" && BDFDB.DataUtils.get(this, "settings", "showInChat")) { if (user && typeof e.returnvalue.props.children == "function" && BDFDB.DataUtils.get(this, "settings", "showInChat")) {
let renderChildren = e.returnvalue.props.children; let renderChildren = e.returnvalue.props.children;
e.returnvalue.props.children = () => { e.returnvalue.props.children = (...args) => {
let renderedChildren = renderChildren(e.instance); let renderedChildren = renderChildren(...args);
this.injectRoleTag(renderedChildren.props.children, user, "chat", e.instance.props.isCompact ? BDFDB.disCN.bottagmessagecompact : BDFDB.disCN.bottagmessagecozy); this.injectRoleTag(renderedChildren.props.children, user, "chat", e.instance.props.isCompact ? BDFDB.disCN.bottagmessagecompact : BDFDB.disCN.bottagmessagecozy);
return renderedChildren; return renderedChildren;
}; };