From 40a94d31e6fabf9d1ddee67ba231fd39fc37faa0 Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Tue, 14 May 2019 11:28:30 +0200 Subject: [PATCH] Update OwnerTag.plugin.js --- Plugins/OwnerTag/OwnerTag.plugin.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Plugins/OwnerTag/OwnerTag.plugin.js b/Plugins/OwnerTag/OwnerTag.plugin.js index d30fa470f0..bd89253c7f 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.1.1";} + getVersion () {return "1.1.2";} getAuthor () {return "DevilBro";} @@ -108,6 +108,9 @@ class OwnerTag { stop () { if (global.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) { BDFDB.removeEles(".owner-tag, .owner-tag-crown"); + + BDFDB.removeLocalStyle(this.name + "HideCrown"); + BDFDB.unloadMessage(this); } } @@ -191,7 +194,8 @@ class OwnerTag { } addHideCSS () { - if (BDFDB.getData("hideNativeCrown", this, "settings")) BDFDB.appendLocalStyle(this.name + "HideCrown", `${BDFDB.dotCNS.member + BDFDB.dotCN.memberownericon}:not(.owner-tag-crown) {display: none;}`); - else BDFDB.removeLocalstyle(this.name + "HideCrown"); + var settings = BDFDB.getAllData(this, "settings"); + if (settings.hideNativeCrown || settings.useCrown) BDFDB.appendLocalStyle(this.name + "HideCrown", `${BDFDB.dotCNS.member + BDFDB.dotCN.memberownericon}:not(.owner-tag-crown) {display: none;}`); + else BDFDB.removeLocalStyle(this.name + "HideCrown"); } }