From 70ce6ff2d663b59f6b9631461db1cf87aa634f3c Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Mon, 3 Feb 2025 21:40:54 -0300 Subject: [PATCH 1/5] Fix reporter display for componentByCode --- src/webpack/webpack.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/webpack/webpack.ts b/src/webpack/webpack.ts index 9e4ea3eb0..7ed791080 100644 --- a/src/webpack/webpack.ts +++ b/src/webpack/webpack.ts @@ -69,12 +69,12 @@ export const filters = { m.constructor?.displayName === name, componentByCode: (...code: CodeFilter): FilterFn => { - const filter = filters.byCode(...code); - return m => { + const byCodeFilter = filters.byCode(...code); + const filter = m => { let inner = m; while (inner != null) { - if (filter(inner)) return true; + if (byCodeFilter(inner)) return true; else if (!inner.$$typeof) return false; else if (inner.type) inner = inner.type; // memos else if (inner.render) inner = inner.render; // forwardRefs @@ -83,6 +83,9 @@ export const filters = { return false; }; + + filter.$$vencordProps = [...code]; + return filter; } }; From 949aad8cc7192a093050f46a0a10aacd4198cfd0 Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Mon, 3 Feb 2025 22:20:57 -0300 Subject: [PATCH 2/5] Fix webpack finding Popout --- src/webpack/common/components.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/webpack/common/components.ts b/src/webpack/common/components.ts index dfe00e337..e31e167e8 100644 --- a/src/webpack/common/components.ts +++ b/src/webpack/common/components.ts @@ -57,7 +57,7 @@ export const Heading = waitForComponent("Heading", filters.componentB export const Select = waitForComponent("Select", filters.componentByCode('.selectPositionTop]:"top"===', '"Escape"===')); export const SearchableSelect = waitForComponent("SearchableSelect", filters.componentByCode('.selectPositionTop]:"top"===', ".multi]:")); export const Slider = waitForComponent("Slider", filters.componentByCode('"markDash".concat(')); -export const Popout = waitForComponent("Popout", filters.componentByCode("ref:this.ref,preload:")); +export const Popout = waitForComponent("Popout", filters.componentByCode("ref:this.ref,", "renderPopout:this.renderPopout,")); export const Dialog = waitForComponent("Dialog", filters.componentByCode('role:"dialog",tabIndex:-1')); export const TabBar = waitForComponent("TabBar", filters.componentByCode("ref:this.tabBarRef,className:")); export const Paginator = waitForComponent("Paginator", filters.componentByCode('rel:"prev",children:')); From 971e1863358ed4b9ac458cc582e9c1c15a9d57ed Mon Sep 17 00:00:00 2001 From: Tomsoz Date: Tue, 4 Feb 2025 19:29:35 +0000 Subject: [PATCH 3/5] CopyEmojiMarkdown: Fix copying animated emojis (#3179) --- src/plugins/copyEmojiMarkdown/index.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/plugins/copyEmojiMarkdown/index.tsx b/src/plugins/copyEmojiMarkdown/index.tsx index a9c018a91..58e7303a3 100644 --- a/src/plugins/copyEmojiMarkdown/index.tsx +++ b/src/plugins/copyEmojiMarkdown/index.tsx @@ -33,11 +33,11 @@ function getEmojiMarkdown(target: Target, copyUnicode: boolean): string { : `:${emojiName}:`; } - const extension = target?.firstChild.src.match( - /https:\/\/cdn\.discordapp\.com\/emojis\/\d+\.(\w+)/ - )?.[1]; + const url = new URL(target.firstChild.src); + const hasParam = url.searchParams.get("animated") === "true"; + const isGif = url.pathname.endsWith(".gif"); - return `<${extension === "gif" ? "a" : ""}:${emojiName.replace(/~\d+$/, "")}:${emojiId}>`; + return `<${(hasParam || isGif) ? "a" : ""}:${emojiName.replace(/~\d+$/, "")}:${emojiId}>`; } const settings = definePluginSettings({ @@ -55,7 +55,7 @@ export default definePlugin({ settings, contextMenus: { - "expression-picker"(children, { target }: { target: Target }) { + "expression-picker"(children, { target }: { target: Target; }) { if (target.dataset.type !== "emoji") return; children.push( From 1e426b4253932b54606b6e183982db70ec83661a Mon Sep 17 00:00:00 2001 From: sadan4 <117494111+sadan4@users.noreply.github.com> Date: Wed, 5 Feb 2025 15:53:47 -0500 Subject: [PATCH 4/5] arRPC: Fix find (#3203) --- src/plugins/arRPC.web/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/arRPC.web/index.tsx b/src/plugins/arRPC.web/index.tsx index 61e048dce..94c507f33 100644 --- a/src/plugins/arRPC.web/index.tsx +++ b/src/plugins/arRPC.web/index.tsx @@ -23,7 +23,7 @@ import definePlugin, { ReporterTestable } from "@utils/types"; import { findByCodeLazy } from "@webpack"; import { ApplicationAssetUtils, FluxDispatcher, Forms, Toasts } from "@webpack/common"; -const fetchApplicationsRPC = findByCodeLazy("APPLICATION_RPC(", "Client ID"); +const fetchApplicationsRPC = findByCodeLazy('"Invalid Origin"', ".application"); async function lookupAsset(applicationId: string, key: string): Promise { return (await ApplicationAssetUtils.fetchAssetIds(applicationId, [key]))[0]; From 848c2299d22478dfb3e6f8c012a7d6edaa13f9aa Mon Sep 17 00:00:00 2001 From: Vendicated Date: Wed, 5 Feb 2025 21:54:43 +0100 Subject: [PATCH 5/5] Bump to v1.11.4 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 057175f9c..dca52a16f 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "vencord", "private": "true", - "version": "1.11.3", + "version": "1.11.4", "description": "The cutest Discord client mod", "homepage": "https://github.com/Vendicated/Vencord#readme", "bugs": {