Update OwnerTag.plugin.js

This commit is contained in:
Mirco Wittrien 2019-06-13 09:34:19 +02:00
parent 666121a8c7
commit 1365c9ab5f
1 changed files with 3 additions and 3 deletions

View File

@ -3,7 +3,7 @@
class OwnerTag {
getName () {return "OwnerTag";}
getVersion () {return "1.1.2";}
getVersion () {return "1.1.3";}
getAuthor () {return "DevilBro";}
@ -11,7 +11,7 @@ class OwnerTag {
initConstructor () {
this.changelog = {
"added":[["Native Crown Option","Added an option to disable the hiding of the native crown, allowing you to have the written owner tag and the crown"]]
"improved":[["Crown","Changed the crown to the new crown icon"]]
};
this.patchModules = {
@ -200,7 +200,7 @@ class OwnerTag {
wrapper.insertBefore(tag, wrapper.querySelector(".TRE-tag,svg[name=MobileDevice]"));
}
else {
let crown = BDFDB.htmlToElement(`<svg name="Crown" class="owner-tag-crown ${isowner ? "owner-tag-owner" : "owner-tag-admin"} ${BDFDB.disCNS.membericon + BDFDB.disCN.memberownericon}" width="24" height="24" viewBox="0 0 24 24"><g fill="none" fill-rule="evenodd"><path fill="${isowner ? "#faa61a" : "#b3b3b3"}" fill-rule="nonzero" d="M2,11 L0,0 L5.5,7 L9,0 L12.5,7 L18,0 L16,11 L2,11 L2,11 Z M16,14 C16,14.5522847 15.5522847,15 15,15 L3,15 C2.44771525,15 2,14.5522847 2,14 L2,13 L16,13 L16,14 Z" transform="translate(3 4)"></path><rect width="24" height="24"></rect></g></svg>`);
let crown = BDFDB.htmlToElement(`<svg name="Crown" class="owner-tag-crown ${isowner ? "owner-tag-owner" : "owner-tag-admin"} ${BDFDB.disCNS.membericon + BDFDB.disCN.memberownericon}" aria-hidden="false" width="24" height="24" viewBox="0 0 16 16"><g fill="none" fill-rule="evenodd"><path fill-rule="evenodd" clip-rule="evenodd" d="M13.6572 5.42868C13.8879 5.29002 14.1806 5.30402 14.3973 5.46468C14.6133 5.62602 14.7119 5.90068 14.6473 6.16202L13.3139 11.4954C13.2393 11.7927 12.9726 12.0007 12.6666 12.0007H3.33325C3.02725 12.0007 2.76058 11.792 2.68592 11.4954L1.35258 6.16202C1.28792 5.90068 1.38658 5.62602 1.60258 5.46468C1.81992 5.30468 2.11192 5.29068 2.34325 5.42868L5.13192 7.10202L7.44592 3.63068C7.46173 3.60697 7.48377 3.5913 7.50588 3.57559C7.5192 3.56612 7.53255 3.55663 7.54458 3.54535L6.90258 2.90268C6.77325 2.77335 6.77325 2.56068 6.90258 2.43135L7.76458 1.56935C7.89392 1.44002 8.10658 1.44002 8.23592 1.56935L9.09792 2.43135C9.22725 2.56068 9.22725 2.77335 9.09792 2.90268L8.45592 3.54535C8.46794 3.55686 8.48154 3.56651 8.49516 3.57618C8.51703 3.5917 8.53897 3.60727 8.55458 3.63068L10.8686 7.10202L13.6572 5.42868ZM2.66667 12.6673H13.3333V14.0007H2.66667V12.6673Z" fill="${isowner ? "currentColor" : "#b3b3b3"}"></path></svg>`);
crown.addEventListener("mouseenter", () => {
BDFDB.createTooltip(isowner ? (channel.type == 3 ? BDFDB.LanguageStrings.GROUP_OWNER : BDFDB.LanguageStrings.GUILD_OWNER) : BDFDB.LanguageStrings.ADMINISTRATOR, crown, {type: "top"});
});