Update 0BDFDB.plugin.js
This commit is contained in:
parent
7285d3f281
commit
606eb9f56d
|
@ -2,7 +2,7 @@
|
||||||
* @name BDFDB
|
* @name BDFDB
|
||||||
* @author DevilBro
|
* @author DevilBro
|
||||||
* @authorId 278543574059057154
|
* @authorId 278543574059057154
|
||||||
* @version 3.7.4
|
* @version 3.7.5
|
||||||
* @description Required Library for DevilBro's Plugins
|
* @description Required Library for DevilBro's Plugins
|
||||||
* @invite Jx3TjNS
|
* @invite Jx3TjNS
|
||||||
* @donate https://www.paypal.me/MircoWittrien
|
* @donate https://www.paypal.me/MircoWittrien
|
||||||
|
@ -8083,7 +8083,9 @@ module.exports = (_ => {
|
||||||
],
|
],
|
||||||
after: [
|
after: [
|
||||||
"DiscordTag",
|
"DiscordTag",
|
||||||
"UserHeaderAvatar"
|
"UserHeaderAvatar",
|
||||||
|
"UserPanelHeader",
|
||||||
|
"UserProfileHeader"
|
||||||
],
|
],
|
||||||
componentDidMount: [
|
componentDidMount: [
|
||||||
"Account",
|
"Account",
|
||||||
|
@ -8122,7 +8124,7 @@ module.exports = (_ => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
Internal._processAvatarRender = function (user, avatar, className) {
|
Internal._processAvatarRender = function (user, avatar, className = "") {
|
||||||
if (BDFDB.ReactUtils.isValidElement(avatar) && BDFDB.ObjectUtils.is(user) && (avatar.props.className || "").indexOf(BDFDB.disCN.bdfdbbadgeavatar) == -1) {
|
if (BDFDB.ReactUtils.isValidElement(avatar) && BDFDB.ObjectUtils.is(user) && (avatar.props.className || "").indexOf(BDFDB.disCN.bdfdbbadgeavatar) == -1) {
|
||||||
let role = "", note = "", color, link, addBadge = Internal.settings.general.showSupportBadges;
|
let role = "", note = "", color, link, addBadge = Internal.settings.general.showSupportBadges;
|
||||||
if (BDFDB_Patrons[user.id] && BDFDB_Patrons[user.id].active) {
|
if (BDFDB_Patrons[user.id] && BDFDB_Patrons[user.id].active) {
|
||||||
|
@ -8323,7 +8325,17 @@ module.exports = (_ => {
|
||||||
};
|
};
|
||||||
Internal.processUserHeaderAvatar = function (e) {
|
Internal.processUserHeaderAvatar = function (e) {
|
||||||
if (!e.instance.props.user) return;
|
if (!e.instance.props.user) return;
|
||||||
e.returnvalue = Internal._processAvatarRender(e.instance.props.user, e.returnvalue, e.instance) || e.returnvalue;
|
e.returnvalue = Internal._processAvatarRender(e.instance.props.user, e.returnvalue) || e.returnvalue;
|
||||||
|
};
|
||||||
|
Internal.processUserPanelHeader = function (e) {
|
||||||
|
if (!e.instance.props.user) return;
|
||||||
|
let [children, index] = BDFDB.ReactUtils.findParent(e.returnvalue, {filter: n => n && n.props && n.props.src && n.props.size});
|
||||||
|
if (index > -1) children[index] = Internal._processAvatarRender(e.instance.props.user, children[index]) || children[index];
|
||||||
|
};
|
||||||
|
Internal.processUserProfileHeader = function (e) {
|
||||||
|
if (!e.instance.props.user) return;
|
||||||
|
let [children, index] = BDFDB.ReactUtils.findParent(e.returnvalue, {filter: n => n && n.props && n.props.src && n.props.size});
|
||||||
|
if (index > -1) children[index] = Internal._processAvatarRender(e.instance.props.user, children[index]) || children[index];
|
||||||
};
|
};
|
||||||
|
|
||||||
MyReact.instanceKey = Object.keys(document.querySelector(BDFDB.dotCN.app) || {}).some(n => n.startsWith("__reactInternalInstance")) ? "_reactInternalFiber" : "_reactInternals";
|
MyReact.instanceKey = Object.keys(document.querySelector(BDFDB.dotCN.app) || {}).some(n => n.startsWith("__reactInternalInstance")) ? "_reactInternalFiber" : "_reactInternals";
|
||||||
|
|
Loading…
Reference in New Issue