From 30c5ad8584720bef320448d2565789006b8816f3 Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Fri, 10 Mar 2023 13:30:33 +0100 Subject: [PATCH] stuff --- Library/_res/0BDFDB.data.json | 2 +- Plugins/EditUsers/EditUsers.plugin.js | 21 +++++++++++++++++++-- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/Library/_res/0BDFDB.data.json b/Library/_res/0BDFDB.data.json index 128bb45e96..b1d5359b1c 100644 --- a/Library/_res/0BDFDB.data.json +++ b/Library/_res/0BDFDB.data.json @@ -455,7 +455,7 @@ "LazyImageZoomable": {"strings": ["renderLinkComponent", "onCloseImage"]}, "ListItemTooltip": {"strings": [".listItemWrapper", "tooltipClassName", "disableWrapper"]}, "MemberListItem": {"protos": ["renderOwner", "renderDecorators", "renderPremium"]}, - "Mention": {"strings": [".iconType", ".color,", "CHANNEL_BROWSER_TITLE"]}, + "Mention": {"strings": [".iconType", ".color,", "),backgroundColor:"]}, "Menu": {"strings": ["\"empty\"", "getItemProps", "isUsingKeyboardNavigation"]}, "Message": {"strings": ["childrenMessageContent", "childrenRepliedMessage", "zalgo", ".buttonContainer"]}, "MessageAccessories": {"protos": ["renderGiftCodes", "renderEmbeds", "renderActivityInvite"]}, diff --git a/Plugins/EditUsers/EditUsers.plugin.js b/Plugins/EditUsers/EditUsers.plugin.js index 5b56bb122a..9238a50875 100644 --- a/Plugins/EditUsers/EditUsers.plugin.js +++ b/Plugins/EditUsers/EditUsers.plugin.js @@ -2,7 +2,7 @@ * @name EditUsers * @author DevilBro * @authorId 278543574059057154 - * @version 4.7.4 + * @version 4.7.5 * @description Allows you to locally edit Users * @invite Jx3TjNS * @donate https://www.paypal.me/MircoWittrien @@ -146,6 +146,7 @@ module.exports = (_ => { "GuildInvitationRow", "IncomingCallModal", "MemberListItem", + "Mention", "MessageContent", "MessageUsername", "NameTag", @@ -192,6 +193,14 @@ module.exports = (_ => { ${BDFDB.dotCN.messagemarkup} span[style*="linear-gradient"] ${BDFDB.dotCN.spoilertext} { color: var(--text-normal); } + ${BDFDB.dotCN.mention}[style*="--edited-mention-color"] { + background-color: rgba(var(--edited-mention-color), .1) !important; + color: rgb(var(--edited-mention-color)) !important; + } + ${BDFDB.dotCN.mention + BDFDB.dotCN.mentioninteractive}[style*="--edited-mention-color"]:hover { + background-color: rgba(var(--edited-mention-color), .3) !important; + color: rgb(var(--edited-mention-color)) !important; + } `; } @@ -905,9 +914,17 @@ module.exports = (_ => { } if (data.color1) { mention.props.color = BDFDB.ColorUtils.convert(BDFDB.ObjectUtils.is(data.color1) ? data.color1[0] : data.color1, "INT"); - if (mention.props.children && mention.props.children.props) mention.props.children.props.color = mention.props.color; + mention.props["edited-mention-color"] = BDFDB.ColorUtils.convert(BDFDB.ObjectUtils.is(data.color1) ? data.color1[0] : data.color1, "RGBCOMP").slice(0, 3).join(","); + if (mention.props.children && mention.props.children.props) { + mention.props.children.props.color = mention.props.color; + mention.props.children.props["edited-mention-color"] = BDFDB.ColorUtils.convert(BDFDB.ObjectUtils.is(data.color1) ? data.color1[0] : data.color1, "RGBCOMP").slice(0, 3).join(","); + } } } + + processMention (e) { + if (e.instance.props["edited-mention-color"]) e.returnvalue.props.style = Object.assign({}, e.returnvalue.props.style, {"--edited-mention-color": e.instance.props["edited-mention-color"]}); + } processChannelReply (e) { if (!this.settings.places.chatWindow || !e.instance.props.reply || !e.instance.props.reply.message || !this.shouldChangeInChat(e.instance.props.reply.message.channel_id)) return;