diff --git a/src/equicordplugins/_api/userArea.ts b/src/equicordplugins/_api/userArea.ts index e2feef2dc..67a62e72c 100644 --- a/src/equicordplugins/_api/userArea.ts +++ b/src/equicordplugins/_api/userArea.ts @@ -8,6 +8,9 @@ import { isPluginEnabled } from "@api/PluginManager"; import betterUserArea from "@equicordplugins/betterUserArea"; import { EquicordDevs } from "@utils/constants"; import definePlugin from "@utils/types"; +import { findCssClassesLazy } from "@webpack"; + +const { iconForeground } = findCssClassesLazy("iconForeground", "autocompleteRowContent"); export default definePlugin({ name: "UserAreaAPI", @@ -18,16 +21,16 @@ export default definePlugin({ { find: "#{intl::ACCOUNT_SPEAKING_WHILE_MUTED}", replacement: { - match: /(className:(\i)\.buttons,.{0,50}?children:\[)/, - replace: "$1...$self.renderButtons(arguments[0],$2)," + match: /(?<=\(\)\(\i\.\i,.{0,50}children:\[)/, + replace: "...$self.renderButtons(arguments[0])," } } ], - renderButtons(props: { nameplate?: any; }, styles: { iconForeground?: string; }) { + renderButtons(props: { nameplate?: any; }) { return Vencord.Api.UserArea._renderButtons({ nameplate: props.nameplate, - iconForeground: props.nameplate != null ? styles.iconForeground : void 0, + iconForeground: props.nameplate != null ? iconForeground : void 0, hideTooltips: this.shouldHideTooltips() }); }, diff --git a/src/equicordplugins/customUserColors/index.tsx b/src/equicordplugins/customUserColors/index.tsx index 20d40c160..745935b88 100644 --- a/src/equicordplugins/customUserColors/index.tsx +++ b/src/equicordplugins/customUserColors/index.tsx @@ -124,7 +124,7 @@ export default definePlugin({ { find: "PrivateChannel.renderAvatar", replacement: { - match: /(\i\]:\i\}\),children:\i\}\),)(?=.{0,25}isSystemDM\(\))/, + match: /(\i\]:\i\}\),children:\i\}\),)(?=.{0,100}Types\.SYSTEM_DM)/, replace: "$1style:{color:`${$self.colorDMList(arguments[0])}`}," }, predicate: () => settings.store.dmList, diff --git a/src/equicordplugins/messageTranslate/index.tsx b/src/equicordplugins/messageTranslate/index.tsx index 3b1739d6a..6384b6ee9 100644 --- a/src/equicordplugins/messageTranslate/index.tsx +++ b/src/equicordplugins/messageTranslate/index.tsx @@ -57,7 +57,7 @@ export default definePlugin({ TranslateMessage: TranslateMessage, patches: [ { - find: ".messageListItem", + find: '.CUSTOM_GIFT?""', replacement: { match: /renderContentOnly:\i}=\i;/, replace: "$&$self.TranslateMessage(arguments[0].message.content).then(response => arguments[0].message.content = response);" diff --git a/src/plugins/_api/nicknameIcons.ts b/src/plugins/_api/nicknameIcons.ts index 3121604ce..6be5f8465 100644 --- a/src/plugins/_api/nicknameIcons.ts +++ b/src/plugins/_api/nicknameIcons.ts @@ -15,8 +15,8 @@ export default definePlugin({ { find: "#{intl::USER_PROFILE_PRONOUNS}", replacement: { - match: /(\.nicknameIcons,children:)(\i)/, - replace: "$1[...Vencord.Api.NicknameIcons._renderIcons({userId:arguments[0].user?.id}),$2]" + match: /(?<=isVerifiedBot\(\).{0,50}\i\.\i,children:)(\i)/, + replace: "[...Vencord.Api.NicknameIcons._renderIcons({userId:arguments[0].user?.id}),$1]" } } ] diff --git a/src/plugins/callTimer/index.tsx b/src/plugins/callTimer/index.tsx index 198c47ea8..1b89033c0 100644 --- a/src/plugins/callTimer/index.tsx +++ b/src/plugins/callTimer/index.tsx @@ -121,11 +121,11 @@ export default definePlugin({ patches: [ { - find: ".usernameSpeaking]", + find: "VOICE_PANEL}};", predicate: () => settings.store.allCallTimers, replacement: [ { - match: /(?<=user:(\i).*?)iconGroup,.{0,200}children:\[/, + match: /(?<=user:(\i).*?\.EMBEDDED.{0,250}className:)\i\.\i,.{0,200}children:\[/, replace: "$&$self.renderTimer($1.id),", predicate: () => !settings.store.showWithoutHover, }, diff --git a/src/plugins/friendsSince/index.tsx b/src/plugins/friendsSince/index.tsx index 938e1a12f..38995d397 100644 --- a/src/plugins/friendsSince/index.tsx +++ b/src/plugins/friendsSince/index.tsx @@ -33,14 +33,6 @@ export default definePlugin({ replace: "$&,$self.FriendsSinceComponent({userId:$1,isSidebar:true})" } }, - // User Profile Modal - { - find: ".connections,userId:", - replacement: { - match: /#{intl::USER_PROFILE_MEMBER_SINCE}\),.{0,100}userId:(\i\.id),.{0,100}}\)}\),/, - replace: "$&,$self.FriendsSinceComponent({userId:$1,isSidebar:false})," - } - }, // User Profile Modal v2 { find: ".MODAL_V2,onClose:", diff --git a/src/plugins/showHiddenChannels/index.tsx b/src/plugins/showHiddenChannels/index.tsx index f198511d4..ea2636583 100644 --- a/src/plugins/showHiddenChannels/index.tsx +++ b/src/plugins/showHiddenChannels/index.tsx @@ -340,7 +340,7 @@ export default definePlugin({ ] }, { - find: '="interactive-normal",overflowCountClassName:', + find: '="interactive-text-default",overflowCountClassName:', replacement: [ { // Create a variable for the channel prop