From 51e1a27a0c0546fc706ee33988a01f1445d9afbc Mon Sep 17 00:00:00 2001 From: Mirco Wittrien <23700969+mwittrien@users.noreply.github.com> Date: Thu, 12 May 2022 12:35:25 +0200 Subject: [PATCH] stuff --- Library/0BDFDB.plugin.js | 14 ++++++++++++-- Library/_res/0BDFDB.data.json | 1 + Themes/_res/SupporterBadge.css | 24 ++++++++++++------------ 3 files changed, 25 insertions(+), 14 deletions(-) diff --git a/Library/0BDFDB.plugin.js b/Library/0BDFDB.plugin.js index e89d5b6b42..c360b7c271 100644 --- a/Library/0BDFDB.plugin.js +++ b/Library/0BDFDB.plugin.js @@ -2,7 +2,7 @@ * @name BDFDB * @author DevilBro * @authorId 278543574059057154 - * @version 2.3.4 + * @version 2.3.5 * @description Required Library for DevilBro's Plugins * @invite Jx3TjNS * @donate https://www.paypal.me/MircoWittrien @@ -19,7 +19,7 @@ module.exports = (_ => { "info": { "name": "BDFDB", "author": "DevilBro", - "version": "2.3.4", + "version": "2.3.5", "description": "Required Library for DevilBro's Plugins" }, "rawUrl": "https://mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js" @@ -3159,6 +3159,16 @@ module.exports = (_ => { } catch (err) {BDFDB.LogUtils.error(["Could not render React Element!", err]);} }; + BDFDB.ReactUtils.hookCall = function (callback, args) { + if (typeof callback != "function") return null; + let returnValue = null, tempNode = document.createElement("div"); + BDFDB.ReactUtils.render(BDFDB.ReactUtils.createElement(_ => { + returnValue = callback(args); + return null; + }), tempNode); + BDFDB.ReactUtils.unmountComponentAtNode(tempNode); + return returnValue; + }; BDFDB.MessageUtils = {}; BDFDB.MessageUtils.isSystemMessage = function (message) { diff --git a/Library/_res/0BDFDB.data.json b/Library/_res/0BDFDB.data.json index 96ff4e718b..7b9dd11e8c 100644 --- a/Library/_res/0BDFDB.data.json +++ b/Library/_res/0BDFDB.data.json @@ -129,6 +129,7 @@ "SpotifyUtils": {"props": ["setActiveDevice", "pause"]}, "StageChannelLiveStore": {"props": ["getAllLiveStageChannels", "useAllLiveStageChannels"]}, "StageChannelStore": {"props": ["getStageInstanceByChannel", "getAllStageInstances"]}, + "StageChannelUtils": {"props": ["getMutableParticipants", "getParticipantCount"]}, "StateStoreUtils": {"props": ["useStateFromStores", "useStateFromStoresArray"]}, "StatusMetaUtils": {"props": ["getApplicationActivity", "getStatus", "getState"]}, "StoreChangeUtils": {"props": ["get", "set", "clear", "remove"]}, diff --git a/Themes/_res/SupporterBadge.css b/Themes/_res/SupporterBadge.css index 0b79117201..0c97315984 100644 --- a/Themes/_res/SupporterBadge.css +++ b/Themes/_res/SupporterBadge.css @@ -31,16 +31,16 @@ /* synax */ .supporter-Z3FfwL.tier3-yTxjsy.hasBadge-4rT8_u[data-user-id="335997977938100226"] .badge-7R_W3s { - background: url(https://mwittrien.github.io/BetterDiscordAddons/Themes/_res/badges/335997977938100226.png) center/cover no-repeat !important; - top: 71% !important; - left: 1% !important; - width: 30% !important; - height: 30% !important; + background: url(https://mwittrien.github.io/BetterDiscordAddons/Themes/_res/badges/335997977938100226.png) center/70% 70% no-repeat !important; + top: 57% !important; + left: -11% !important; + width: 52% !important; + height: 52% !important; } /* umbra */ .supporter-Z3FfwL.tier3-yTxjsy.hasBadge-4rT8_u[data-user-id="155552545782235137"] .badge-7R_W3s { - -webkit-mask: url(https://mwittrien.github.io/BetterDiscordAddons/Themes/_res/badges/155552545782235137.png) center/cover no-repeat !important; + -webkit-mask: url(https://mwittrien.github.io/BetterDiscordAddons/Themes/_res/badges/155552545782235137.png) center/contain no-repeat !important; background: linear-gradient(90deg, #34aeeb, #cc34eb) !important; top: 71% !important; left: 1% !important; @@ -60,7 +60,7 @@ /* case */ .supporter-Z3FfwL.tier3-yTxjsy.hasBadge-4rT8_u[data-user-id="646354877336911884"] .badge-7R_W3s { - -webkit-mask: url('data:image/svg+xml; utf8, ') center/cover no-repeat !important; + -webkit-mask: url('data:image/svg+xml; utf8, ') center/contain no-repeat !important; background: #3dff00 !important; top: 67% !important; left: -2% !important; @@ -70,7 +70,7 @@ /* Duckx */ .supporter-Z3FfwL.tier3-yTxjsy.hasBadge-4rT8_u[data-user-id="266072167349747712"] .badge-7R_W3s { - -webkit-mask: url('data:image/svg+xml; utf8, ') center/cover no-repeat !important; + -webkit-mask: url('data:image/svg+xml; utf8, ') center/contain no-repeat !important; background: #ffd300 !important; top: 69% !important; left: -0.5% !important; @@ -80,7 +80,7 @@ /* Keyra */ .supporter-Z3FfwL.tier3-yTxjsy.hasBadge-4rT8_u[data-user-id="760784464560914452"] .badge-7R_W3s { - -webkit-mask: url('data:image/svg+xml; utf8, ') center/cover no-repeat !important; + -webkit-mask: url('data:image/svg+xml; utf8, ') center/contain no-repeat !important; background: #18eaff !important; top: 72% !important; left: 1% !important; @@ -90,7 +90,7 @@ /* Sayori */ .supporter-Z3FfwL.tier3-yTxjsy.hasBadge-4rT8_u[data-user-id="446396928092274720"] .badge-7R_W3s { - -webkit-mask: url('data:image/svg+xml; utf8, ') center/cover no-repeat !important; + -webkit-mask: url('data:image/svg+xml; utf8, ') center/contain no-repeat !important; background: linear-gradient(135deg, #31bbe3, #d929fb) !important; top: 72% !important; left: 1% !important; @@ -101,7 +101,7 @@ /* liam */ .supporter-Z3FfwL.tier3-yTxjsy.hasBadge-4rT8_u[data-user-id="779410322187354163"] .badge-7R_W3s { -webkit-mask: unset !important; - background: url(https://mwittrien.github.io/BetterDiscordAddons/Themes/_res/badges/779410322187354163.png) center/cover no-repeat !important; + background: url(https://mwittrien.github.io/BetterDiscordAddons/Themes/_res/badges/779410322187354163.png) center/contain no-repeat !important; top: 72% !important; left: 2% !important; width: 28% !important; @@ -111,7 +111,7 @@ /* AzukiPuddles */ .supporter-Z3FfwL.tier3-yTxjsy.hasBadge-4rT8_u[data-user-id="89482511343702016"] .badge-7R_W3s { -webkit-mask: unset !important; - background: url('data:image/svg+xml; utf8, ') center/cover no-repeat !important; + background: url('data:image/svg+xml; utf8, ') center/contain no-repeat !important; top: 71% !important; left: 2% !important; width: 30% !important;