This commit is contained in:
Mirco Wittrien 2020-09-11 19:57:28 +02:00
parent 1da72ed36a
commit 4bc3c39b15
3 changed files with 6 additions and 6 deletions

View File

@ -6978,7 +6978,7 @@ module.exports = (_ => {
const BDFDB_Patrons = Object.assign({}, InternalData.BDFDB_Patrons);
InternalBDFDB._processAvatarRender = function (user, avatar) {
if (BDFDB.ReactUtils.isValidElement(avatar) && BDFDB.ObjectUtils.is(user)) {
if (BDFDB.ReactUtils.isValidElement(avatar) && BDFDB.ObjectUtils.is(user) && (avatar.props.className || "").indexOf(BDFDB.disCN.bdfdbbadgeavatar) > -1) {
avatar.props["user_by_BDFDB"] = user.id;
let role = "", className = BDFDB.DOMUtils.formatClassName((avatar.props.className || "").replace(BDFDB.disCN.avatar, "")), addBadge = settings.showSupportBadges, customBadge = false;
if (BDFDB_Patrons[user.id] && BDFDB_Patrons[user.id].active) {
@ -7015,7 +7015,7 @@ module.exports = (_ => {
}
};
InternalBDFDB._processAvatarMount = function (user, avatar, wrapper) {
if (Node.prototype.isPrototypeOf(avatar) && BDFDB.ObjectUtils.is(user)) {
if (Node.prototype.isPrototypeOf(avatar) && BDFDB.ObjectUtils.is(user) && (avatar.className || "").indexOf(BDFDB.disCN.bdfdbbadgeavatar) > -1) {
if (wrapper) wrapper.setAttribute("user_by_BDFDB", user.id);
avatar.setAttribute("user_by_BDFDB", user.id);
let role = "", addBadge = settings.showSupportBadges, customBadge = false;
@ -7027,7 +7027,7 @@ module.exports = (_ => {
else if (user.id == InternalData.myId) {
addBadge = true;
role = "Theme Developer";
avatar.className = BDFDB.DOMUtils.formatClassName(avatar.className, BDFDB.disCN.bdfdbhasbadge, BDFDB.disCN.bdfdbbadgeavatar, BDFDB.disCN.bdfdbdev);
avatar.className = BDFDB.DOMUtils.formatClassName(avatar.className, addBadge && BDFDB.disCN.bdfdbhasbadge, BDFDB.disCN.bdfdbbadgeavatar, BDFDB.disCN.bdfdbdev);
}
if (role && !avatar.querySelector(BDFDB.dotCN.bdfdbbadge)) {
if (addBadge) {

View File

@ -11001,7 +11001,7 @@
"562008872467038230": {active:false, t3:true, custom:true} // BEAUDEN
};
InternalBDFDB._processAvatarRender = function (user, avatar) {
if (BDFDB.ReactUtils.isValidElement(avatar) && BDFDB.ObjectUtils.is(user)) {
if (BDFDB.ReactUtils.isValidElement(avatar) && BDFDB.ObjectUtils.is(user) && (avatar.props.className || "").indexOf(BDFDB.disCN.bdfdbbadgeavatar) > -1) {
avatar.props["user_by_BDFDB"] = user.id;
let role = "", className = BDFDB.DOMUtils.formatClassName((avatar.props.className || "").replace(BDFDB.disCN.avatar, "")), addBadge = settings.showSupportBadges, customBadge = false;
if (BDFDB_Patrons[user.id] && BDFDB_Patrons[user.id].active) {
@ -11038,7 +11038,7 @@
}
};
InternalBDFDB._processAvatarMount = function (user, avatar, wrapper) {
if (Node.prototype.isPrototypeOf(avatar) && BDFDB.ObjectUtils.is(user)) {
if (Node.prototype.isPrototypeOf(avatar) && BDFDB.ObjectUtils.is(user) && (avatar.className || "").indexOf(BDFDB.disCN.bdfdbbadgeavatar) > -1) {
if (wrapper) wrapper.setAttribute("user_by_BDFDB", user.id);
avatar.setAttribute("user_by_BDFDB", user.id);
let role = "", addBadge = settings.showSupportBadges, customBadge = false;

File diff suppressed because one or more lines are too long