From e7cf14e8e1b32bd75b125c9f1eea18a3bfd54470 Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Thu, 21 Nov 2019 22:32:44 +0100 Subject: [PATCH] Update OwnerTag.plugin.js --- Plugins/OwnerTag/OwnerTag.plugin.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Plugins/OwnerTag/OwnerTag.plugin.js b/Plugins/OwnerTag/OwnerTag.plugin.js index ab366767fb..7a46d5d9d1 100644 --- a/Plugins/OwnerTag/OwnerTag.plugin.js +++ b/Plugins/OwnerTag/OwnerTag.plugin.js @@ -3,7 +3,7 @@ class OwnerTag { getName () {return "OwnerTag";} - getVersion () {return "1.2.2";} + getVersion () {return "1.2.3";} getAuthor () {return "DevilBro";} @@ -19,8 +19,8 @@ class OwnerTag { after: { MemberListItem: "render", MessageUsername: "render", - UserPopout: "componentDidMount", - UserProfile: "componentDidMount" + UserPopout: ["componentDidMount", "componentDidUpdate"], + UserProfile: ["componentDidMount", "componentDidUpdate"] } }; } @@ -188,7 +188,8 @@ class OwnerTag { } appendOwnerTag (parent, user, usertype, tagclass = "", inverted = false) { - let renderWrapper = document.createElement("span"); + BDFDB.DOMUtils.remove(parent.querySelectorAll(".owner-tag")); + let renderWrapper = BDFDB.DOMUtils.create(``); BDFDB.ReactUtils.render(this.createOwnerTag(user, usertype, tagclass, inverted), renderWrapper); parent.appendChild(renderWrapper); }