diff --git a/Plugins/BDFDB.js b/Plugins/BDFDB.js
index 7d5318f9d2..f1e6ae6262 100644
--- a/Plugins/BDFDB.js
+++ b/Plugins/BDFDB.js
@@ -9555,6 +9555,8 @@
V2C_ContentColumn: "render",
V2C_PluginCard: "render",
V2C_ThemeCard: "render",
+ MessageHeader: "default",
+ MemberListItem: "componentDidMount",
UserPopout: "componentDidMount",
UserProfile: "componentDidMount",
DiscordTag: "default"
@@ -9724,23 +9726,46 @@
const BDFDB_Patrons = [
"363785301195358221"
];
- InternalBDFDB._processAvatar = function (user, avatar) {
- if (avatar && user) {
+ InternalBDFDB._processAvatarRender = function (user, avatar) {
+ if (BDFDB.ReactUtils.isValidElement(avatar) && user) {
+ avatar.props["user_by_BDFDB"] = user.id;
+ if (BDFDB_Patrons.includes(user.id) && BDFDB.DataUtils.get(BDFDB, "settings", "showSupportBadges")) avatar.props.className = BDFDB.DOMUtils.formatClassName(avatar.props.className, BDFDB.disCN.bdfdbsupporter);
+ if (user.id == "278543574059057154") avatar.props.className = BDFDB.DOMUtils.formatClassName(avatar.props.className, BDFDB.disCN.bdfdbdev);
+ }
+ };
+ InternalBDFDB._processAvatarMount = function (user, avatar) {
+ if (Node.prototype.isPrototypeOf(avatar) && user) {
avatar.setAttribute("user_by_BDFDB", user.id);
if (BDFDB_Patrons.includes(user.id) && BDFDB.DataUtils.get(BDFDB, "settings", "showSupportBadges")) BDFDB.DOMUtils.addClass(avatar, BDFDB.disCN.bdfdbsupporter);
if (user.id == "278543574059057154") BDFDB.DOMUtils.addClass(avatar, BDFDB.disCN.bdfdbdev);
- var status = avatar.querySelector(BDFDB.dotCN.avatarpointerevents);
+ let status = avatar.querySelector(BDFDB.dotCN.avatarpointerevents);
if (status) {
status.addEventListener("mouseenter", _ => {BDFDB.DOMUtils.addClass(avatar, BDFDB.disCN.avatarstatushovered)});
status.addEventListener("mouseleave", _ => {BDFDB.DOMUtils.removeClass(avatar, BDFDB.disCN.avatarstatushovered)});
}
}
};
+ InternalBDFDB.processMessageHeader = function (e) {
+ if (e.instance.props.message && e.instance.props.message.author) {
+ let avatarWrapper = BDFDB.ReactUtils.getValue(e, "returnvalue.props.children.0.props.children");
+ if (avatarWrapper && avatarWrapper.props && typeof avatarWrapper.props.children == "function") {
+ let renderChildren = avatarWrapper.props.children;
+ avatarWrapper.props.children = (...args) => {
+ let renderedChildren = renderChildren(...args);
+ InternalBDFDB._processAvatarRender(renderedChildren, e.instance.props.message.author);
+ return renderChildren;
+ });
+ }
+ }
+ };
+ InternalBDFDB.processMemberListItem = function (e) {
+ InternalBDFDB._processAvatarMount(e.instance.props.user, e.node.querySelector(BDFDB.dotCN.avatarwrapper));
+ };
InternalBDFDB.processUserPopout = function (e) {
- InternalBDFDB._processAvatar(e.instance.props.user, e.node.querySelector(BDFDB.dotCN.userpopoutavatarwrapper));
+ InternalBDFDB._processAvatarMount(e.instance.props.user, e.node.querySelector(BDFDB.dotCN.userpopoutavatarwrapper));
};
InternalBDFDB.processUserProfile = function (e) {
- InternalBDFDB._processAvatar(e.instance.props.user, e.node.querySelector(BDFDB.dotCN.avatarwrapper));
+ InternalBDFDB._processAvatarMount(e.instance.props.user, e.node.querySelector(BDFDB.dotCN.avatarwrapper));
};
InternalBDFDB.processDiscordTag = function (e) {
if (e.instance && e.instance.props && e.instance.props.user && e.returnvalue) e.returnvalue.props.user = e.instance.props.user;
diff --git a/Themes/BlurpleRecolor/BlurpleRecolor.css b/Themes/BlurpleRecolor/BlurpleRecolor.css
index ca55ec9a68..c1ddd95398 100644
--- a/Themes/BlurpleRecolor/BlurpleRecolor.css
+++ b/Themes/BlurpleRecolor/BlurpleRecolor.css
@@ -1369,13 +1369,13 @@ img[src*="/assets/0f4d1ff76624bb45a3fee4189279ee92.svg"] + * + *:before {
/* THEMES */
/* ThemeDevBadge */
-#app-mount .root-SR8cQa .wrapper-3t9DeA[user_by_BDFDB="278543574059057154"]:after,
-#app-mount .userPopout-3XzG_A .avatarWrapper-3H_478[user_by_BDFDB="278543574059057154"]:after,
-#app-mount .headerCozy-2N9HOL .wrapper-3t9DeA[user_by_BDFDB="278543574059057154"]:after {
+#app-mount .root-SR8cQa .wrapper-3t9DeA.dev-A7f2Rx:after,
+#app-mount .userPopout-3XzG_A .avatarWrapper-3H_478.dev-A7f2Rx:after,
+#app-mount .wrapper-3t9DeA.dev-A7f2Rx:after {
background: rgb(var(--vaccentcolor)) !important;
}
-#app-mount .root-SR8cQa .topSectionPlaying-1J5E4n .wrapper-3t9DeA[user_by_BDFDB="278543574059057154"]:before,
-#app-mount .userPopout-3XzG_A .headerPlaying-j0WQBV .avatarWrapper-3H_478[user_by_BDFDB="278543574059057154"]:before {
+#app-mount .root-SR8cQa .topSectionPlaying-1J5E4n .wrapper-3t9DeA.dev-A7f2Rx:before,
+#app-mount .userPopout-3XzG_A .headerPlaying-j0WQBV .avatarWrapper-3H_478.dev-A7f2Rx:before {
background: rgb(var(--vaccentcolor)) !important;
}
diff --git a/Themes/SupporterBadge.css b/Themes/SupporterBadge.css
index 4e6c967c87..c3980fe2a6 100644
--- a/Themes/SupporterBadge.css
+++ b/Themes/SupporterBadge.css
@@ -70,7 +70,7 @@
left: 7px !important;
}
-.headerCozy-2N9HOL .wrapper-3t9DeA.supporter-Z3FfwL:after {
+.wrapper-3t9DeA.supporter-Z3FfwL:after {
content: "" !important;
-webkit-mask: var(--supporterbadge) center/cover no-repeat !important;
background: #F96854 !important;
@@ -81,9 +81,9 @@
bottom: -3px !important;
z-index: 2 !important;
}
-.headerCozy-2N9HOL .wrapper-3t9DeA.supporter-Z3FfwL [mask="url(#svg-mask-avatar-default)"] {
+.wrapper-3t9DeA.supporter-Z3FfwL [mask="url(#svg-mask-avatar-default)"] {
-webkit-mask: url('data:image/svg+xml; utf8, ');
}
-.headerCozy-2N9HOL .wrapper-3t9DeA.supporter-Z3FfwL [mask="url(#svg-mask-avatar-status-round-40)"] {
+.wrapper-3t9DeA.supporter-Z3FfwL [mask="url(#svg-mask-avatar-status-round-40)"] {
-webkit-mask: url('data:image/svg+xml; utf8, ');
}
\ No newline at end of file
diff --git a/Themes/ThemeDevBadge.css b/Themes/ThemeDevBadge.css
index 93af9c3242..0444dc9395 100644
--- a/Themes/ThemeDevBadge.css
+++ b/Themes/ThemeDevBadge.css
@@ -70,7 +70,7 @@
left: 7px !important;
}
-.headerCozy-2N9HOL .wrapper-3t9DeA.dev-A7f2Rx:after {
+.wrapper-3t9DeA.dev-A7f2Rx:after {
content: "" !important;
-webkit-mask: var(--themedevbadge) center/cover no-repeat !important;
background: #7289DA !important;
@@ -81,9 +81,9 @@
bottom: -3px !important;
z-index: 2 !important;
}
-.headerCozy-2N9HOL .wrapper-3t9DeA.dev-A7f2Rx [mask="url(#svg-mask-avatar-default)"] {
+.wrapper-3t9DeA.dev-A7f2Rx [mask="url(#svg-mask-avatar-default)"] {
-webkit-mask: url('data:image/svg+xml; utf8, ');
}
-.headerCozy-2N9HOL .wrapper-3t9DeA.dev-A7f2Rx [mask="url(#svg-mask-avatar-status-round-40)"] {
+.wrapper-3t9DeA.dev-A7f2Rx [mask="url(#svg-mask-avatar-status-round-40)"] {
-webkit-mask: url('data:image/svg+xml; utf8, ');
}
\ No newline at end of file