From b14d16fd7311c53e06530779c4c035104d921995 Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Fri, 23 Jan 2026 17:52:36 -0300 Subject: [PATCH] aaaaaa --- src/plugins/_api/serverList.ts | 2 +- src/plugins/_core/settings.tsx | 8 ++++---- src/plugins/betterFolders/index.tsx | 15 ++++++--------- src/plugins/betterSessions/index.tsx | 6 +++--- src/plugins/betterSettings/index.tsx | 8 +------- src/plugins/blurNsfw/index.ts | 4 ++-- 6 files changed, 17 insertions(+), 26 deletions(-) diff --git a/src/plugins/_api/serverList.ts b/src/plugins/_api/serverList.ts index cd566803b..edbaea695 100644 --- a/src/plugins/_api/serverList.ts +++ b/src/plugins/_api/serverList.ts @@ -27,7 +27,7 @@ export default definePlugin({ { find: "#{intl::DISCODO_DISABLED}", replacement: { - match: /(?<=#{intl::DISCODO_DISABLED}.+?return)(\(.{0,150}?tutorialId:.+?}\))(?=}function)/, + match: /(?<=#{intl::DISCODO_DISABLED}.+?return)(\(.{0,150}?tutorialId:"friends-list".+?}\))(?=}function)/, replace: "[$1].concat(Vencord.Api.ServerList.renderAll(Vencord.Api.ServerList.ServerListRenderPosition.Above))" } }, diff --git a/src/plugins/_core/settings.tsx b/src/plugins/_core/settings.tsx index 791960bf6..60152ea9d 100644 --- a/src/plugins/_core/settings.tsx +++ b/src/plugins/_core/settings.tsx @@ -105,14 +105,14 @@ export default definePlugin({ find: "#{intl::COPY_VERSION}", replacement: [ { - match: /,\i\.\i\),.+?(?=null!=(\i)&&(.{0,20}\i\.Text.{0,200}?,children:).{0,15}?("span"),({className:\i\.\i,children:\["Build Override: ",\1\.id\]\})\)\}\))/, + match: /"text-xxs\/normal".+?(?=null!=(\i)&&(.{0,20}\i\.Text.{0,200}?,children:).{0,15}?("span"),({className:\i\.\i,children:\["Build Override: ",\1\.id\]\})\)\}\))/, replace: (m, _buildOverride, makeRow, component, props) => { props = props.replace(/children:\[.+\]/, ""); return `${m},$self.makeInfoElements(${component},${props}).map(e=>${makeRow}e})),`; } }, { - match: /"data-mtctest.+?\[\(0,\i\.jsxs?\)\((.{1,10}),(\{[^{}}]+\{.{0,20}.\i,.{0,50}\})\)," "/, + match: /"text-xs\/normal".+?\[\(0,\i\.jsxs?\)\((.{1,10}),(\{[^{}}]+\{.{0,20}className:\i.\i,.+?\})\)," "/, replace: (m, component, props) => { props = props.replace(/children:\[.+\]/, ""); return `${m},$self.makeInfoElements(${component},${props})`; @@ -141,8 +141,8 @@ export default definePlugin({ find: "#{intl::USER_SETTINGS_ACTIONS_MENU_LABEL}", replacement: { // Skip the check Discord performs to make sure the section being selected in the user settings context menu is valid - match: /void\(null!=\(\i=Object.values\(\i\.\i\).+?&&(?=\(0,\i\.openUserSettings\)\(\i,\{section:\i)/, - replace: "(" + match: /null!=\(\i=Object.values\(\i\.\i\).{0,50}?&&(?=\(0,\i\.openUserSettings\)\(\i,\{section:\i)/, + replace: "" } }, { diff --git a/src/plugins/betterFolders/index.tsx b/src/plugins/betterFolders/index.tsx index 7636e26d7..24d5b61bc 100644 --- a/src/plugins/betterFolders/index.tsx +++ b/src/plugins/betterFolders/index.tsx @@ -178,10 +178,7 @@ export default definePlugin({ }, // If we are rendering the Better Folders sidebar, we filter out everything but the Guild List from the Sidebar children { - // match the bottom (NEW) footer - // both the top and bottom one use barClassName - // so we match the call to classNames that's only in the bottom one - match: /\}\),barClassName:.+?\}\)\]/, + match: /reverse:!0,.+?barClassName:.+?\}\)\]/, replace: "$&.filter($self.makeGuildsBarSidebarFilter(!!arguments[0]?.isBetterFolders))" } ] @@ -227,20 +224,20 @@ export default definePlugin({ // If we are rendering the normal GuildsBar sidebar, we avoid rendering guilds from folders that are expanded { predicate: () => !settings.store.keepIcons, - match: /(?=\i\(\(\i,\i,\i\)=>{let{key:.{0,70}"ul")(?<=selected:\i,expanded:(\i),.+?)/, - replace: (_, isExpanded) => `$self.shouldRenderContents(arguments[0],${isExpanded})?null:` + match: /"--custom-folder-color".+?(?=\i\(\(\i,\i,\i\)=>{let{key:.{0,70}"ul")(?<=selected:\i,expanded:(\i),.+?)/, + replace: (m, isExpanded) => `${m}$self.shouldRenderContents(arguments[0],${isExpanded})?null:` }, // Decide if we should render the expanded folder background if we are rendering the Better Folders sidebar { predicate: () => settings.store.showFolderIcon !== FolderIconDisplay.Always, - match: /--custom-folder-color.{0,110}?children:\[/, + match: /"--custom-folder-color".{0,110}?children:\[/, replace: "$&$self.shouldShowFolderIconAndBackground(!!arguments[0]?.isBetterFolders,arguments[0]?.betterFoldersExpandedIds)&&" }, // Decide if we should render the expanded folder icon if we are rendering the Better Folders sidebar { predicate: () => settings.store.showFolderIcon !== FolderIconDisplay.Always, - match: /(?<="span",[^,]{0,50}?,)(?=\i,)/, - replace: "!$self.shouldShowFolderIconAndBackground(!!arguments[0]?.isBetterFolders,arguments[0]?.betterFoldersExpandedIds)?null:" + match: /"--custom-folder-color".+?className:\i\.\i}\),(?=\i,)/, + replace: "$&!$self.shouldShowFolderIconAndBackground(!!arguments[0]?.isBetterFolders,arguments[0]?.betterFoldersExpandedIds)?null:" } ] }, diff --git a/src/plugins/betterSessions/index.tsx b/src/plugins/betterSessions/index.tsx index dbe465afe..78aea6133 100644 --- a/src/plugins/betterSessions/index.tsx +++ b/src/plugins/betterSessions/index.tsx @@ -71,12 +71,12 @@ export default definePlugin({ }, { match: /({variant:"text-sm\/medium",className:\i\.\i,children:.{70,110}{children:"\\xb7"}\),\(0,\i\.\i\)\("span",{children:)(\i\[\d+\])}/, - replace: "$1$self.renderTimestamp({ ...arguments[0], timeLabel: $2 })}" + replace: "$1$self.renderTimestamp({...arguments[0],timeLabel:$2})}" }, // Replace the icon { - match: /,\i\.\i\),children:\[(?<=,icon:(\i)\}.+?)/, - replace: "$& $self.renderIcon({ ...arguments[0], DeviceIcon: $1 }), false &&" + match: /children:\[(?=.{0,125}?width:"32")(?<=,icon:(\i)\}.+?)/, + replace: "children:[$self.renderIcon({...arguments[0],DeviceIcon:$1}),false&&" } ] } diff --git a/src/plugins/betterSettings/index.tsx b/src/plugins/betterSettings/index.tsx index f6615f4e4..2236d2fdc 100644 --- a/src/plugins/betterSettings/index.tsx +++ b/src/plugins/betterSettings/index.tsx @@ -160,13 +160,7 @@ export default definePlugin({ // Thus, we sanity check webpack modules Layer(props: LayerProps) { try { - // findCssClassesLazy returns an empty object if the classes aren't found - // so we have to explicitly test for the presence of classes - if (!Classes.layer?.length) { - new Logger("BetterSettings").error("Failed to find classes"); - return props.children; - } - [FocusLock.$$vencordGetWrappedComponent(), ComponentDispatch].forEach(e => e.test); + [FocusLock.$$vencordGetWrappedComponent(), ComponentDispatch, Classes.layer].forEach(e => e.test); } catch { new Logger("BetterSettings").error("Failed to find some components"); return props.children; diff --git a/src/plugins/blurNsfw/index.ts b/src/plugins/blurNsfw/index.ts index 322a0da3f..a778aa2ce 100644 --- a/src/plugins/blurNsfw/index.ts +++ b/src/plugins/blurNsfw/index.ts @@ -48,8 +48,8 @@ export default definePlugin({ find: "}renderEmbeds(", replacement: [ { - match: /\(\)\(\i,\i\.\i(?<=this.renderShareClientTheme\(.{0,250})/, - replace: "$&+(this.props.channel.nsfw? ' vc-nsfw-img': '')" + match: /(\.renderReactions\(\i\).+?className:)/, + replace: '$&(this.props.channel.nsfw?" vc-nsfw-img":"")+' } ] }