This commit is contained in:
Mirco Wittrien 2020-02-03 13:42:32 +01:00
parent afcae1a786
commit de258f5949
4 changed files with 131 additions and 25 deletions

View File

@ -4404,6 +4404,7 @@
var DiscordClassModules = {};
DiscordClassModules.BDFDB = {
BDFDBundefined: "BDFDB_undefined",
avatarStatusHovered: "statusHovered-gF2976",
cardInner: "inner-OP_8zd",
cardWrapper: "card-rT4Wbb",
charCounter: "counter-uAzbKp",
@ -4421,6 +4422,7 @@
colorPickerSwatchSingle: "single-Fbb1wB",
colorPickerSwatchSelected: "selected-f5IVXN",
confirmModal: "confirmModal-t-WDWJ",
dev: "dev-A7f2Rx",
favButtonContainer: "favbutton-8Fzu45",
guild: "guild-r3yAE_",
guildLowerLeftBadge: "lowerLeftBadge-zr4T_9",
@ -4458,6 +4460,7 @@
settingsTableHeaders: "settingsTableHeaders-WKzw9_",
settingsTableHeaderVertical: "headerVertical-4MNxqk",
settingsTableList: "settingsTableList-f6sW2y",
supporter: "supporter-Z3FfwL",
svgIcon: "icon-GhnIRB",
table: "table-moqjM0",
tableBodyCell: "bodyCell-dQam9V",
@ -4950,9 +4953,12 @@
avatarnoicon: ["AvatarIcon", "noIcon"],
avatarpointer: ["Avatar", "pointer"],
avatarpointerevents: ["Avatar", "pointerEvents"],
avatarstatushovered: ["BDFDB", "avatarStatusHovered"],
avatarwrapper: ["Avatar", "wrapper"],
backdrop: ["Backdrop", "backdrop"],
badgewrapper: ["NotFound", "badgeWrapper"],
bdfdbdev: ["BDFDB", "dev"],
bdfdbsupporter: ["BDFDB", "supporter"],
bottag: ["BotTag", "botTag"],
bottaginvert: ["BotTag", "botTagInvert"],
bottagmember: ["Member", "botTag"],
@ -8358,6 +8364,8 @@
BDFDB.LibraryComponents = Object.assign({}, LibraryComponents);
BDFDB.DOMUtils.appendLocalStyle("BDFDB", `
@import url(https://mwittrien.github.io/BetterDiscordAddons/Themes/SupporterBadge.css);
${BDFDB.dotCN.changelogicon} {
display: inline-block;
background: currentColor;
@ -9713,13 +9721,18 @@
return settingspanel = BDFDB.PluginUtils.createSettingsPanel(BDFDB, settingsitems);
};
const BDFDB_Patrons = [
"363785301195358221"
];
InternalBDFDB._processAvatar = function (user, avatar) {
if (avatar && user) {
avatar.setAttribute("user_by_BDFDB", user.id);
if (BDFDB_Patrons.includes(user.id) && BDFDB.DataUtils.get(BDFDB, "settings", "showSupportBadges")) BDFDB.DOMUtils.addClass(avatar, BDFDB.disCN.bdfdbsupporter);
if (user.id == "278543574059057154") BDFDB.DOMUtils.addClass(avatar, BDFDB.disCN.bdfdbdev);
var status = avatar.querySelector(BDFDB.dotCN.avatarpointerevents);
if (status) {
status.addEventListener("mouseenter", _ => {BDFDB.DOMUtils.addClass(avatar, "statusHovered")});
status.addEventListener("mouseleave", _ => {BDFDB.DOMUtils.removeClass(avatar, "statusHovered")});
status.addEventListener("mouseenter", _ => {BDFDB.DOMUtils.addClass(avatar, BDFDB.disCN.avatarstatushovered)});
status.addEventListener("mouseleave", _ => {BDFDB.DOMUtils.removeClass(avatar, BDFDB.disCN.avatarstatushovered)});
}
}
};

View File

@ -6330,16 +6330,20 @@ body.folderContentIsOpen-zz6FgW .titleBar-AC4pGV.typeMacOS-3EmCyP .macButtons-2M
/* ~~~~ 19.1. THEMEDEVBADGE ~~~~ */
#app-mount .root-SR8cQa .wrapper-3t9DeA[user_by_BDFDB="278543574059057154"]:not(.statusHovered):hover + .headerInfo-30uryT:before,
#app-mount .userPopout-3XzG_A .avatarWrapper-3H_478[user_by_BDFDB="278543574059057154"]:not(.statusHovered):hover .wrapper-3t9DeA:before {
#app-mount .root-SR8cQa .wrapper-3t9DeA.dev-A7f2Rx:not(.statusHovered-gF2976):hover + .headerInfo-30uryT:before,
#app-mount .userPopout-3XzG_A .avatarWrapper-3H_478.dev-A7f2Rx:not(.statusHovered-gF2976):hover .wrapper-3t9DeA:before,
#app-mount .root-SR8cQa .wrapper-3t9DeA.supporter-Z3FfwL:not(.statusHovered-gF2976):hover + .headerInfo-30uryT:before,
#app-mount .userPopout-3XzG_A .avatarWrapper-3H_478.supporter-Z3FfwL:not(.statusHovered-gF2976):hover .wrapper-3t9DeA:before {
background-color: rgb(var(--vaccentcolor)) !important;
box-shadow: 0 2px 10px 0 rgba(var(--vtransparencycolor), 0.3) !important;
color: rgb(var(--fontwhite1)) !important;
}
#app-mount .root-SR8cQa .wrapper-3t9DeA[user_by_BDFDB="278543574059057154"]:not(.statusHovered):hover + .headerInfo-30uryT:after {
#app-mount .root-SR8cQa .wrapper-3t9DeA.dev-A7f2Rx:not(.statusHovered-gF2976):hover + .headerInfo-30uryT:after,
#app-mount .root-SR8cQa .wrapper-3t9DeA.supporter-Z3FfwL:not(.statusHovered-gF2976):hover + .headerInfo-30uryT:after {
border-right-color: rgb(var(--vaccentcolor)) !important;
}
#app-mount .userPopout-3XzG_A .avatarWrapper-3H_478[user_by_BDFDB="278543574059057154"]:not(.statusHovered):hover .wrapper-3t9DeA:after {
#app-mount .userPopout-3XzG_A .avatarWrapper-3H_478.dev-A7f2Rx:not(.statusHovered-gF2976):hover .wrapper-3t9DeA:after,
#app-mount .userPopout-3XzG_A .avatarWrapper-3H_478.supporter-Z3FfwL:not(.statusHovered-gF2976):hover .wrapper-3t9DeA:after {
border-top-color: rgb(var(--vaccentcolor)) !important;
}

89
Themes/SupporterBadge.css Normal file
View File

@ -0,0 +1,89 @@
:root {
--supporterbadge: url('data:image/svg+xml; utf8, <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 508.52 508.52" style="enable-background:new 0 0 508.52 508.52;" xml:space="preserve"><path fill="black" d="M63.565, 476.737c0, 12.84, 7.755, 24.473, 19.61, 29.367c3.941, 1.621, 8.073, 2.415, 12.173, 2.415c8.263, 0, 16.4-3.242, 22.47-9.312L254.26, 362.765l136.442, 136.442c6.07, 6.07, 14.207, 9.312, 22.47, 9.312c4.1, 0, 8.232-0.795, 12.141-2.415c11.887-4.894, 19.642-16.527, 19.642-29.367V165.347H63.565V476.737z"/><path fill="black" d="M413.172, 0H95.347C77.804, 0, 63.565, 14.239, 63.565, 31.782v61.782h381.39V31.782C444.955, 14.239, 430.716, 0, 413.172, 0z"/></svg>') !important;
}
.root-SR8cQa .wrapper-3t9DeA.supporter-Z3FfwL:after,
.userPopout-3XzG_A .avatarWrapper-3H_478.supporter-Z3FfwL:after {
content: "" !important;
-webkit-mask: var(--supporterbadge) center/cover no-repeat !important;
background: #F96854 !important;
position: absolute !important;
z-index: 1002 !important;
width: 22px !important;
height: 22px !important;
left: 0px !important;
bottom: -2px !important;
pointer-events: none !important;
}
.root-SR8cQa .topSectionPlaying-1J5E4n .wrapper-3t9DeA.supporter-Z3FfwL:after,
.userPopout-3XzG_A .headerPlaying-j0WQBV .avatarWrapper-3H_478.supporter-Z3FfwL:after {
filter: brightness(80%) !important;
}
.root-SR8cQa .wrapper-3t9DeA.supporter-Z3FfwL [mask="url(#svg-mask-avatar-status-round-80)"],
.userPopout-3XzG_A .avatarWrapper-3H_478.supporter-Z3FfwL [mask="url(#svg-mask-avatar-status-round-80)"] {
-webkit-mask: url('data:image/svg+xml; utf8, <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="0 0 1 1"><circle fill="white" cx="0.5" cy="0.5" r="0.5"/><circle xmlns="http://www.w3.org/2000/svg" fill="black" cx="0.85" cy="0.85" r="0.175"/><rect fill="black" x="-0.025" y="0.675" width="0.35" height="0.5" rx="0.09" ry="0.09"/></svg>');
}
.root-SR8cQa .wrapper-3t9DeA.supporter-Z3FfwL [mask="url(#svg-mask-avatar-status-mobile-80)"],
.userPopout-3XzG_A .avatarWrapper-3H_478.supporter-Z3FfwL [mask="url(#svg-mask-avatar-status-mobile-80)"] {
-webkit-mask: url('data:image/svg+xml; utf8, <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="0 0 1 1"><circle fill="white" cx="0.5" cy="0.5" r="0.5"/><rect fill="black" x="0.675" y="0.575" width="0.35" height="0.45" rx="0.09" ry="0.09"/><rect fill="black" x="-0.025" y="0.675" width="0.35" height="0.5" rx="0.09" ry="0.09"/></svg>');
}
.root-SR8cQa .wrapper-3t9DeA.supporter-Z3FfwL:not(.statusHovered-gF2976):hover + .headerInfo-30uryT:before,
.userPopout-3XzG_A .avatarWrapper-3H_478.supporter-Z3FfwL:not(.statusHovered-gF2976):hover .wrapper-3t9DeA:before {
content: "BDFDB Patron" !important;
white-space: nowrap !important;
background-color: #000 !important;
border-radius: 5px !important;
box-shadow: 0 2px 10px 0 rgba(0,0,0,.2) !important;
color: #dcddde !important;
font-size: 14px !important;
font-weight: 500 !important;
line-height: 16px !important;
max-width: 190px !important;
padding: 8px 12px !important;
position: absolute !important;
z-index: 1002 !important;
pointer-events: none !important;
}
.root-SR8cQa .wrapper-3t9DeA.supporter-Z3FfwL:not(.statusHovered-gF2976):hover + .headerInfo-30uryT:after,
.userPopout-3XzG_A .avatarWrapper-3H_478.supporter-Z3FfwL:not(.statusHovered-gF2976):hover .wrapper-3t9DeA:after {
content: "" !important;
position: absolute !important;
z-index: 1002 !important;
border: 5px solid transparent !important;
pointer-events: none !important;
}
.root-SR8cQa .wrapper-3t9DeA.supporter-Z3FfwL:not(.statusHovered-gF2976):hover + .headerInfo-30uryT:before {
left: 52px !important;
top: 87px !important;
}
.root-SR8cQa .wrapper-3t9DeA.supporter-Z3FfwL:not(.statusHovered-gF2976):hover + .headerInfo-30uryT:after {
border-right-color: #000 !important;
left: 42px !important;
top: 98px !important;
}
.userPopout-3XzG_A .avatarWrapper-3H_478.supporter-Z3FfwL:not(.statusHovered-gF2976):hover .wrapper-3t9DeA:before {
top: 14px !important;
left: -53px !important;
}
.userPopout-3XzG_A .avatarWrapper-3H_478.supporter-Z3FfwL:not(.statusHovered-gF2976):hover .wrapper-3t9DeA:after {
border-top-color: #000 !important;
top: 45px !important;
left: 7px !important;
}
.headerCozy-2N9HOL .wrapper-3t9DeA.supporter-Z3FfwL:after {
content: "" !important;
-webkit-mask: var(--supporterbadge) center/cover no-repeat !important;
background: #F96854 !important;
position: absolute !important;
width: 14px !important;
height: 14px !important;
left: -2px !important;
bottom: -3px !important;
z-index: 2 !important;
}
.headerCozy-2N9HOL .wrapper-3t9DeA.supporter-Z3FfwL [mask="url(#svg-mask-avatar-default)"] {
-webkit-mask: url('data:image/svg+xml; utf8, <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="0 0 1 1"><circle fill="white" cx="0.5" cy="0.5" r="0.5"></circle><rect fill="black" x="-0.15" y="0.6375" width="0.5" height="0.5" rx="0.13125" ry="0.13125"></rect></svg>');
}
.headerCozy-2N9HOL .wrapper-3t9DeA.supporter-Z3FfwL [mask="url(#svg-mask-avatar-status-round-40)"] {
-webkit-mask: url('data:image/svg+xml; utf8, <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="0 0 1 1"><circle fill="white" cx="0.5" cy="0.5" r="0.5"></circle><circle fill="black" cx="0.85" cy="0.85" r="0.25"></circle><rect fill="black" x="-0.15" y="0.6375" width="0.5" height="0.5" rx="0.13125" ry="0.13125"></rect></svg>');
}

View File

@ -1,8 +1,8 @@
:root {
--themedevbadge: url('data:image/svg+xml; utf8, <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 508.52 508.52" style="enable-background:new 0 0 508.52 508.52;" xml:space="preserve"><path fill="black" d="M63.565, 476.737c0, 12.84, 7.755, 24.473, 19.61, 29.367c3.941, 1.621, 8.073, 2.415, 12.173, 2.415c8.263, 0, 16.4-3.242, 22.47-9.312L254.26, 362.765l136.442, 136.442c6.07, 6.07, 14.207, 9.312, 22.47, 9.312c4.1, 0, 8.232-0.795, 12.141-2.415c11.887-4.894, 19.642-16.527, 19.642-29.367V165.347H63.565V476.737z"/><path fill="black" d="M413.172, 0H95.347C77.804, 0, 63.565, 14.239, 63.565, 31.782v61.782h381.39V31.782C444.955, 14.239, 430.716, 0, 413.172, 0z"/></svg>') !important;
}
.root-SR8cQa .wrapper-3t9DeA[user_by_BDFDB="278543574059057154"]:after,
.userPopout-3XzG_A .avatarWrapper-3H_478[user_by_BDFDB="278543574059057154"]:after {
.root-SR8cQa .wrapper-3t9DeA.dev-A7f2Rx:after,
.userPopout-3XzG_A .avatarWrapper-3H_478.dev-A7f2Rx:after {
content: "" !important;
-webkit-mask: var(--themedevbadge) center/cover no-repeat !important;
background: #7289DA !important;
@ -14,20 +14,20 @@
bottom: -2px !important;
pointer-events: none !important;
}
.root-SR8cQa .topSectionPlaying-1J5E4n .wrapper-3t9DeA[user_by_BDFDB="278543574059057154"]:after,
.userPopout-3XzG_A .headerPlaying-j0WQBV .avatarWrapper-3H_478[user_by_BDFDB="278543574059057154"]:after {
.root-SR8cQa .topSectionPlaying-1J5E4n .wrapper-3t9DeA.dev-A7f2Rx:after,
.userPopout-3XzG_A .headerPlaying-j0WQBV .avatarWrapper-3H_478.dev-A7f2Rx:after {
filter: brightness(80%) !important;
}
.root-SR8cQa .wrapper-3t9DeA[user_by_BDFDB="278543574059057154"] [mask="url(#svg-mask-avatar-status-round-80)"],
.userPopout-3XzG_A .avatarWrapper-3H_478[user_by_BDFDB="278543574059057154"] [mask="url(#svg-mask-avatar-status-round-80)"] {
.root-SR8cQa .wrapper-3t9DeA.dev-A7f2Rx [mask="url(#svg-mask-avatar-status-round-80)"],
.userPopout-3XzG_A .avatarWrapper-3H_478.dev-A7f2Rx [mask="url(#svg-mask-avatar-status-round-80)"] {
-webkit-mask: url('data:image/svg+xml; utf8, <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="0 0 1 1"><circle fill="white" cx="0.5" cy="0.5" r="0.5"/><circle xmlns="http://www.w3.org/2000/svg" fill="black" cx="0.85" cy="0.85" r="0.175"/><rect fill="black" x="-0.025" y="0.675" width="0.35" height="0.5" rx="0.09" ry="0.09"/></svg>');
}
.root-SR8cQa .wrapper-3t9DeA[user_by_BDFDB="278543574059057154"] [mask="url(#svg-mask-avatar-status-mobile-80)"],
.userPopout-3XzG_A .avatarWrapper-3H_478[user_by_BDFDB="278543574059057154"] [mask="url(#svg-mask-avatar-status-mobile-80)"] {
.root-SR8cQa .wrapper-3t9DeA.dev-A7f2Rx [mask="url(#svg-mask-avatar-status-mobile-80)"],
.userPopout-3XzG_A .avatarWrapper-3H_478.dev-A7f2Rx [mask="url(#svg-mask-avatar-status-mobile-80)"] {
-webkit-mask: url('data:image/svg+xml; utf8, <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="0 0 1 1"><circle fill="white" cx="0.5" cy="0.5" r="0.5"/><rect fill="black" x="0.675" y="0.575" width="0.35" height="0.45" rx="0.09" ry="0.09"/><rect fill="black" x="-0.025" y="0.675" width="0.35" height="0.5" rx="0.09" ry="0.09"/></svg>');
}
.root-SR8cQa .wrapper-3t9DeA[user_by_BDFDB="278543574059057154"]:not(.statusHovered):hover + .headerInfo-30uryT:before,
.userPopout-3XzG_A .avatarWrapper-3H_478[user_by_BDFDB="278543574059057154"]:not(.statusHovered):hover .wrapper-3t9DeA:before {
.root-SR8cQa .wrapper-3t9DeA.dev-A7f2Rx:not(.statusHovered-gF2976):hover + .headerInfo-30uryT:before,
.userPopout-3XzG_A .avatarWrapper-3H_478.dev-A7f2Rx:not(.statusHovered-gF2976):hover .wrapper-3t9DeA:before {
content: "Theme Developer" !important;
white-space: nowrap !important;
background-color: #000 !important;
@ -43,34 +43,34 @@
z-index: 1002 !important;
pointer-events: none !important;
}
.root-SR8cQa .wrapper-3t9DeA[user_by_BDFDB="278543574059057154"]:not(.statusHovered):hover + .headerInfo-30uryT:after,
.userPopout-3XzG_A .avatarWrapper-3H_478[user_by_BDFDB="278543574059057154"]:not(.statusHovered):hover .wrapper-3t9DeA:after {
.root-SR8cQa .wrapper-3t9DeA.dev-A7f2Rx:not(.statusHovered-gF2976):hover + .headerInfo-30uryT:after,
.userPopout-3XzG_A .avatarWrapper-3H_478.dev-A7f2Rx:not(.statusHovered-gF2976):hover .wrapper-3t9DeA:after {
content: "" !important;
position: absolute !important;
z-index: 1002 !important;
border: 5px solid transparent !important;
pointer-events: none !important;
}
.root-SR8cQa .wrapper-3t9DeA[user_by_BDFDB="278543574059057154"]:not(.statusHovered):hover + .headerInfo-30uryT:before {
.root-SR8cQa .wrapper-3t9DeA.dev-A7f2Rx:not(.statusHovered-gF2976):hover + .headerInfo-30uryT:before {
left: 52px !important;
top: 87px !important;
}
.root-SR8cQa .wrapper-3t9DeA[user_by_BDFDB="278543574059057154"]:not(.statusHovered):hover + .headerInfo-30uryT:after {
.root-SR8cQa .wrapper-3t9DeA.dev-A7f2Rx:not(.statusHovered-gF2976):hover + .headerInfo-30uryT:after {
border-right-color: #000 !important;
left: 42px !important;
top: 98px !important;
}
.userPopout-3XzG_A .avatarWrapper-3H_478[user_by_BDFDB="278543574059057154"]:not(.statusHovered):hover .wrapper-3t9DeA:before {
.userPopout-3XzG_A .avatarWrapper-3H_478.dev-A7f2Rx:not(.statusHovered-gF2976):hover .wrapper-3t9DeA:before {
top: 14px !important;
left: -53px !important;
}
.userPopout-3XzG_A .avatarWrapper-3H_478[user_by_BDFDB="278543574059057154"]:not(.statusHovered):hover .wrapper-3t9DeA:after {
.userPopout-3XzG_A .avatarWrapper-3H_478.dev-A7f2Rx:not(.statusHovered-gF2976):hover .wrapper-3t9DeA:after {
border-top-color: #000 !important;
top: 45px !important;
left: 7px !important;
}
.headerCozy-2N9HOL .wrapper-3t9DeA[user_by_BDFDB="278543574059057154"]:after {
.headerCozy-2N9HOL .wrapper-3t9DeA.dev-A7f2Rx:after {
content: "" !important;
-webkit-mask: var(--themedevbadge) center/cover no-repeat !important;
background: #7289DA !important;
@ -81,9 +81,9 @@
bottom: -3px !important;
z-index: 2 !important;
}
.headerCozy-2N9HOL .wrapper-3t9DeA[user_by_BDFDB="278543574059057154"] [mask="url(#svg-mask-avatar-default)"] {
.headerCozy-2N9HOL .wrapper-3t9DeA.dev-A7f2Rx [mask="url(#svg-mask-avatar-default)"] {
-webkit-mask: url('data:image/svg+xml; utf8, <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="0 0 1 1"><circle fill="white" cx="0.5" cy="0.5" r="0.5"></circle><rect fill="black" x="-0.15" y="0.6375" width="0.5" height="0.5" rx="0.13125" ry="0.13125"></rect></svg>');
}
.headerCozy-2N9HOL .wrapper-3t9DeA[user_by_BDFDB="278543574059057154"] [mask="url(#svg-mask-avatar-status-round-40)"] {
.headerCozy-2N9HOL .wrapper-3t9DeA.dev-A7f2Rx [mask="url(#svg-mask-avatar-status-round-40)"] {
-webkit-mask: url('data:image/svg+xml; utf8, <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="0 0 1 1"><circle fill="white" cx="0.5" cy="0.5" r="0.5"></circle><circle fill="black" cx="0.85" cy="0.85" r="0.25"></circle><rect fill="black" x="-0.15" y="0.6375" width="0.5" height="0.5" rx="0.13125" ry="0.13125"></rect></svg>');
}