diff --git a/src/plugins/betterRoleDot/index.ts b/src/plugins/betterRoleDot/index.ts index b6bc816fa..f1b4834c3 100644 --- a/src/plugins/betterRoleDot/index.ts +++ b/src/plugins/betterRoleDot/index.ts @@ -44,7 +44,8 @@ export default definePlugin({ patches: [ { - find: ".dotBorderBase", + // class used in this module is dotBorderBase + find: "0H16C18.2091", replacement: { match: /,viewBox:"0 0 20 20"/, replace: "$&,onClick:()=>$self.copyToClipBoard(arguments[0].color),style:{cursor:'pointer'}", diff --git a/src/plugins/decor/ui/components/DecorSection.tsx b/src/plugins/decor/ui/components/DecorSection.tsx index 3209b4356..e25c816cb 100644 --- a/src/plugins/decor/ui/components/DecorSection.tsx +++ b/src/plugins/decor/ui/components/DecorSection.tsx @@ -13,7 +13,7 @@ import { openChangeDecorationModal } from "@plugins/decor/ui/modals/ChangeDecora import { findComponentByCodeLazy } from "@webpack"; import { useEffect } from "@webpack/common"; -const CustomizationSection = findComponentByCodeLazy(".customizationSectionBackground"); +const CustomizationSection = findComponentByCodeLazy(".DESCRIPTION", "hasBackground:"); export interface DecorSectionProps { hideTitle?: boolean; diff --git a/src/plugins/decor/ui/index.ts b/src/plugins/decor/ui/index.ts index eeb644b24..a10824c51 100644 --- a/src/plugins/decor/ui/index.ts +++ b/src/plugins/decor/ui/index.ts @@ -11,4 +11,4 @@ export const cl = classNameFactory("vc-decor-"); export const DecorationModalClasses = findCssClassesLazy("modalPreview", "modalCloseButton", "spinner", "modal"); export const requireAvatarDecorationModal = extractAndLoadChunksLazy(["initialSelectedDecoration:", /initialSelectedDecoration:\i,.{0,300}\i\.e\(/]); -export const requireCreateStickerModal = extractAndLoadChunksLazy(["stickerInspected]:"]); +export const requireCreateStickerModal = extractAndLoadChunksLazy([".CREATE_STICKER_MODAL,", "isDisplayingIndividualStickers"]); diff --git a/src/plugins/fakeNitro/index.tsx b/src/plugins/fakeNitro/index.tsx index 468aa117f..d3fffbb20 100644 --- a/src/plugins/fakeNitro/index.tsx +++ b/src/plugins/fakeNitro/index.tsx @@ -189,11 +189,11 @@ export default definePlugin({ makeBypassPatches(), // Patch the emoji picker in voice calls to not be bypassed by fake nitro { - find: "emojiItemDisabled]", + find: '.getByName("fork_and_knife")', predicate: () => settings.store.enableEmojiBypass, replacement: { - match: /CHAT/, - replace: "STATUS" + match: ".CHAT", + replace: ".STATUS" } }, { diff --git a/src/plugins/messageLatency/index.tsx b/src/plugins/messageLatency/index.tsx index 9ce3070a3..6f66fb036 100644 --- a/src/plugins/messageLatency/index.tsx +++ b/src/plugins/messageLatency/index.tsx @@ -10,7 +10,6 @@ import { Devs } from "@utils/constants"; import { isNonNullish } from "@utils/guards"; import definePlugin, { OptionType } from "@utils/types"; import { Message } from "@vencord/discord-types"; -import { findComponentByCodeLazy } from "@webpack"; import { AuthenticationStore, SnowflakeUtils, Tooltip } from "@webpack/common"; type FillValue = ("status-danger" | "status-warning" | "status-positive" | "text-muted"); @@ -26,7 +25,6 @@ interface Diff { } const DISCORD_KT_DELAY = 1471228928; -const HiddenVisually = findComponentByCodeLazy(".hiddenVisually]:"); export default definePlugin({ name: "MessageLatency", @@ -162,13 +160,7 @@ export default definePlugin({ text={text} position="top" > - { - props => <> - {} - {/* Time Out indicator uses this, I think this is for a11y */} - Delayed Message - - } + {props => } ; }, { noop: true }); }, diff --git a/src/plugins/messageLinkEmbeds/index.tsx b/src/plugins/messageLinkEmbeds/index.tsx index 13120046c..12be48146 100644 --- a/src/plugins/messageLinkEmbeds/index.tsx +++ b/src/plugins/messageLinkEmbeds/index.tsx @@ -26,7 +26,7 @@ import { classes } from "@utils/misc"; import { Queue } from "@utils/Queue"; import definePlugin, { OptionType } from "@utils/types"; import { Channel, Message } from "@vencord/discord-types"; -import { findComponentByCodeLazy, findCssClassesLazy } from "@webpack"; +import { findComponentByCodeLazy, findComponentLazy, findCssClassesLazy } from "@webpack"; import { Button, ChannelStore, @@ -47,8 +47,8 @@ const messageCache = new Map(); -const Embed = findComponentByCodeLazy(".inlineMediaEmbed"); -const AutoModEmbed = findComponentByCodeLazy(".withFooter]:", "childrenMessageContent:"); +const Embed = findComponentLazy(m => m.prototype?.renderSuppressButton); +const AutoModEmbed = findComponentByCodeLazy("withFooter", "childrenMessageContent:"); const ChannelMessage = findComponentByCodeLazy("childrenExecutedCommand:", ".hideAccessories"); const SearchResultClasses = findCssClassesLazy("message", "searchResult"); diff --git a/src/plugins/plainFolderIcon/index.ts b/src/plugins/plainFolderIcon/index.ts index 6b3bc11ed..84390e22e 100644 --- a/src/plugins/plainFolderIcon/index.ts +++ b/src/plugins/plainFolderIcon/index.ts @@ -28,12 +28,17 @@ export default definePlugin({ patches: [ { - find: ".folderPreviewGuildIconError", + find: "#{intl::GUILD_FOLDER_TOOLTIP_A11Y_LABEL}", replacement: [ { // Discord always renders both plain and guild icons folders and uses a css transtion to switch between them - match: /(?<=.folderButtonContent]:(!\i))/, - replace: ',"vc-plainFolderIcon-plain":$1' + // let {hovered: h, sorting: s} = props; + // hasFolderButtonContent = h && s; + // ... + // className: cn({[_1]: hasFolderButtonContent, [_2]: !hasFolderButtonContent}), + // children: [!hasFolderButtonContent && ...] + match: /className:\i\(\)\(\{\[\i\.\i\]:(\i),\[\i\.\i\]:!\1(?=.{0,30}children:\[!\i&&)/, + replace: (m, hasFolderButtonContent) => `${m},"vc-plainFolderIcon-plain":${hasFolderButtonContent}` } ] diff --git a/src/webpack/common/components.ts b/src/webpack/common/components.ts index d7affc0e6..8fd2d8eef 100644 --- a/src/webpack/common/components.ts +++ b/src/webpack/common/components.ts @@ -50,8 +50,6 @@ export const Button = ButtonCompat; /** @deprecated Use FormSwitch from Vencord */ export const Switch = FormSwitchCompat as never; -/** @deprecated Use Card from Vencord */ -export const Card = waitForComponent("Card", filters.componentByCode(".editable),", ".outline:")); export const Checkbox = waitForComponent("Checkbox", filters.componentByCode('"data-toggleable-component":"checkbox')); export const Tooltip = waitForComponent("Tooltip", m => m.prototype?.shouldShowTooltip && m.prototype.render, TooltipFallback);