From daa48d1e791e9cc666ce7f8c633631fbd3dc941e Mon Sep 17 00:00:00 2001 From: sadan4 <117494111+sadan4@users.noreply.github.com> Date: Wed, 29 Apr 2026 22:20:09 -0400 Subject: [PATCH 1/3] fix CallTimer, ReviewDB, SHC & ImplicitRelationships (#4158) Co-authored-by: thororen1234 <78185467+thororen1234@users.noreply.github.com> Co-authored-by: prism --- src/plugins/callTimer/index.tsx | 4 ++-- src/plugins/implicitRelationships/index.ts | 2 +- src/plugins/noMosaic/index.ts | 7 ------- src/plugins/reviewDB/index.tsx | 2 +- src/plugins/showConnections/index.tsx | 2 +- src/plugins/showHiddenChannels/index.tsx | 6 +++--- src/plugins/voiceMessages/index.tsx | 2 +- 7 files changed, 9 insertions(+), 16 deletions(-) diff --git a/src/plugins/callTimer/index.tsx b/src/plugins/callTimer/index.tsx index 7e7457663..cddcab1fb 100644 --- a/src/plugins/callTimer/index.tsx +++ b/src/plugins/callTimer/index.tsx @@ -80,8 +80,8 @@ export default definePlugin({ find: "renderConnectionStatus(){", replacement: { // in renderConnectionStatus() - match: /(lineClamp:1,children:)(\i)(?=,|}\))/, - replace: "$1[$2,$self.renderTimer(this.props.channel.id)]" + match: /(renderConnectionStatus\(\).{0,1000}?lineClamp:1,children:)(\i)(?=,|}\))/, + replace: "$1[$2,$self.renderTimer(this.props?.channel?.id)]" } }], diff --git a/src/plugins/implicitRelationships/index.ts b/src/plugins/implicitRelationships/index.ts index 14126c7e3..3af463e3f 100644 --- a/src/plugins/implicitRelationships/index.ts +++ b/src/plugins/implicitRelationships/index.ts @@ -96,7 +96,7 @@ export default definePlugin({ { find: ".REQUEST_GUILD_MEMBERS,", replacement: { - match: /\.send\(\i\.REQUEST_GUILD_MEMBERS,{/, + match: /\.send\(\i\.\i\.REQUEST_GUILD_MEMBERS,{/, replace: "$&nonce:arguments[1].nonce," } }, diff --git a/src/plugins/noMosaic/index.ts b/src/plugins/noMosaic/index.ts index b360e1ea1..90b74b927 100644 --- a/src/plugins/noMosaic/index.ts +++ b/src/plugins/noMosaic/index.ts @@ -27,13 +27,6 @@ export default definePlugin({ settings, patches: [ - { - find: '"PLAINTEXT_PREVIEW":"OTHER"', - replacement: { - match: /return"IMAGE"===\i\|\|"VIDEO"===\i(?:\|\|("VISUAL_PLACEHOLDER"===\i)\|\|\i&&"CLIP"===\i)?/, - replace: (_, visualPlaceholderPred) => visualPlaceholderPred != null ? `return ${visualPlaceholderPred}` : "return false" - } - }, { find: "renderAttachments(", predicate: () => settings.store.inlineVideo, diff --git a/src/plugins/reviewDB/index.tsx b/src/plugins/reviewDB/index.tsx index 78332f91f..65009b098 100644 --- a/src/plugins/reviewDB/index.tsx +++ b/src/plugins/reviewDB/index.tsx @@ -94,7 +94,7 @@ export default definePlugin({ { // User popout // Same find as ShowConnections - find: "#{intl::XcTHmQ::raw}", + find: "#{intl::USER_PROFILE_FRIEND_REQUEST_TOAST}", replacement: { match: /user:(\i),widgets:.{0,100}?\}\),/, replace: "$&$self.renderProfileComponent({user:$1})," diff --git a/src/plugins/showConnections/index.tsx b/src/plugins/showConnections/index.tsx index 4e4196068..a5ce1863a 100644 --- a/src/plugins/showConnections/index.tsx +++ b/src/plugins/showConnections/index.tsx @@ -162,7 +162,7 @@ export default definePlugin({ patches: [ { // Same find as ReviewDB - find: "#{intl::XcTHmQ::raw}", + find: "#{intl::USER_PROFILE_FRIEND_REQUEST_TOAST}", replacement: { match: /userId:\i\.id,guild:\i\}\)(?=])/, replace: "$&,$self.profilePopoutComponent(arguments[0])" diff --git a/src/plugins/showHiddenChannels/index.tsx b/src/plugins/showHiddenChannels/index.tsx index 8264a5ea5..d0735efef 100644 --- a/src/plugins/showHiddenChannels/index.tsx +++ b/src/plugins/showHiddenChannels/index.tsx @@ -157,8 +157,8 @@ export default definePlugin({ predicate: () => settings.store.showMode === ShowMode.LockIcon, replacement: { // Lock Icon - match: /(?=switch\((\i)\.type\).{0,30}\.GUILD_ANNOUNCEMENT.{0,70}\(0,\i\.\i\))/, - replace: (_, channel) => `if($self.isHiddenChannel(${channel}))return $self.LockIcon;` + match: /(?<=(\i)\.isNSFW\(\);)switch\(\i\.type\)/, + replace: (m, channel) => `if($self.isHiddenChannel(${channel}))return $self.LockIcon;${m}` } }, { @@ -217,7 +217,7 @@ export default definePlugin({ }, { // Make the state of the old version of unreads box not include hidden channels - find: "ignoreRecents:!0", + find: "GUILD_EVENT)}),[", replacement: { match: /(?<=\.id\)\))(?=&&\(0,\i\.\i\)\((\i)\))/, replace: "&&!$self.isHiddenChannel($1)" diff --git a/src/plugins/voiceMessages/index.tsx b/src/plugins/voiceMessages/index.tsx index 6ab387ea2..1b60189eb 100644 --- a/src/plugins/voiceMessages/index.tsx +++ b/src/plugins/voiceMessages/index.tsx @@ -83,7 +83,7 @@ export default definePlugin({ patches: [ { - find: "#{intl::3XohGn::raw}", + find: "#{intl::PAUSE_VOICE_MESSAGE_A11Y_LABEL}", replacement: { match: /(?<=\i=)(?=\i\.memo\(.{0,50}?=1,onVolumeChange:[^}]+?waveform:[^}]+?playbackCacheKey:)/, replace: "$self.VoiceMessage=", From 562940a4ba2787d388b1fd1f6f19991462c71133 Mon Sep 17 00:00:00 2001 From: Vendicated Date: Thu, 30 Apr 2026 04:32:57 +0200 Subject: [PATCH 2/3] fix shiki codeblock error --- .../components/Highlighter.tsx | 30 +++++++++++++------ .../{index.ts => index.tsx} | 19 ++++-------- 2 files changed, 26 insertions(+), 23 deletions(-) rename src/plugins/shikiCodeblocks.desktop/{index.ts => index.tsx} (84%) diff --git a/src/plugins/shikiCodeblocks.desktop/components/Highlighter.tsx b/src/plugins/shikiCodeblocks.desktop/components/Highlighter.tsx index 8da163cec..fd58ed1c4 100644 --- a/src/plugins/shikiCodeblocks.desktop/components/Highlighter.tsx +++ b/src/plugins/shikiCodeblocks.desktop/components/Highlighter.tsx @@ -22,9 +22,9 @@ import { shiki } from "@plugins/shikiCodeblocks.desktop/api/shiki"; import { useShikiSettings } from "@plugins/shikiCodeblocks.desktop/hooks/useShikiSettings"; import { useTheme } from "@plugins/shikiCodeblocks.desktop/hooks/useTheme"; import { hex2Rgb } from "@plugins/shikiCodeblocks.desktop/utils/color"; -import { cl, hljs, shouldUseHljs } from "@plugins/shikiCodeblocks.desktop/utils/misc"; +import { cl, hljs, requireHljs, shouldUseHljs } from "@plugins/shikiCodeblocks.desktop/utils/misc"; import { useAwaiter, useIntersection } from "@utils/react"; -import { React } from "@webpack/common"; +import { React, useEffect } from "@webpack/common"; import { ButtonRow } from "./ButtonRow"; import { Code } from "./Code"; @@ -43,13 +43,25 @@ export interface HighlighterProps { isPreview: boolean; } -export const createHighlighter = (props: HighlighterProps) => ( -
-        
-            
-        
-    
-); +let didLoadHljs = false; +export const HighlighterContainer = (props: HighlighterProps) => { + const [_, _err, isPending] = useAwaiter(requireHljs); + + useEffect(() => { + if (!isPending) didLoadHljs = true; + }, [isPending]); + + if (!didLoadHljs && isPending) return null; + + return ( +
+            
+                
+            
+        
+ ); +}; + export const Highlighter = ({ lang, content, diff --git a/src/plugins/shikiCodeblocks.desktop/index.ts b/src/plugins/shikiCodeblocks.desktop/index.tsx similarity index 84% rename from src/plugins/shikiCodeblocks.desktop/index.ts rename to src/plugins/shikiCodeblocks.desktop/index.tsx index 975670877..f8fce7dcc 100644 --- a/src/plugins/shikiCodeblocks.desktop/index.ts +++ b/src/plugins/shikiCodeblocks.desktop/index.tsx @@ -24,12 +24,11 @@ import definePlugin, { ReporterTestable } from "@utils/types"; import previewExampleText from "file://previewExample.tsx"; import { shiki } from "./api/shiki"; -import { createHighlighter } from "./components/Highlighter"; +import { HighlighterContainer } from "./components/Highlighter"; import deviconStyle from "./devicon.css?managed"; import { settings } from "./settings"; import { DeviconSetting } from "./types"; import { clearStyles } from "./utils/createStyle"; -import { requireHljs } from "./utils/misc"; export default definePlugin({ name: "ShikiCodeblocks", @@ -55,6 +54,7 @@ export default definePlugin({ } } ], + start: async () => { if (settings.store.useDevIcon !== DeviconSetting.Disabled) enableStyle(deviconStyle); @@ -65,21 +65,12 @@ export default definePlugin({ shiki.destroy(); clearStyles(); }, - settingsAboutComponent: () => createHighlighter({ - lang: "tsx", - content: previewExampleText, - isPreview: true - }), + + settingsAboutComponent: () => , // exports shiki, - createHighlighter, renderHighlighter: ({ lang, content }: { lang: string; content: string; }) => { - requireHljs(); - return createHighlighter({ - lang: lang?.toLowerCase(), - content, - isPreview: false, - }); + return ; }, }); From e009d5f8824675ec0612172943fd56e51d5ec8c7 Mon Sep 17 00:00:00 2001 From: Vendicated Date: Thu, 30 Apr 2026 04:35:21 +0200 Subject: [PATCH 3/3] 1.14.11 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 829715e65..be0c43307 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "vencord", "private": "true", - "version": "1.14.10", + "version": "1.14.11", "description": "The cutest Discord client mod", "homepage": "https://github.com/Vendicated/Vencord#readme", "bugs": {