From 3992f971d021b97481e1d5a16e4fb897c9304e39 Mon Sep 17 00:00:00 2001 From: Vendicated Date: Sun, 2 Nov 2025 18:21:42 +0100 Subject: [PATCH] fix missing Toolbox --- src/plugins/vencordToolbox/index.tsx | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/plugins/vencordToolbox/index.tsx b/src/plugins/vencordToolbox/index.tsx index 5a7b8cad..719a14ea 100644 --- a/src/plugins/vencordToolbox/index.tsx +++ b/src/plugins/vencordToolbox/index.tsx @@ -25,7 +25,7 @@ import { Devs } from "@utils/constants"; import definePlugin from "@utils/types"; import { findComponentByCodeLazy } from "@webpack"; import { Menu, Popout, useRef, useState } from "@webpack/common"; -import type { ReactNode } from "react"; +import type { PropsWithChildren, ReactNode } from "react"; const HeaderBarIcon = findComponentByCodeLazy(".HEADER_BAR_BADGE_TOP:", '.iconBadge,"top"'); @@ -131,16 +131,20 @@ export default definePlugin({ { find: '?"BACK_FORWARD_NAVIGATION":', replacement: { - // TODO: (?:\.button) is for stable compat and should be removed soon:tm: - match: /focusSectionProps:"HELP".{0,20},className:(\i(?:\.button)?)\}\),/, - replace: "$& $self.renderVencordPopoutButton($1)," + match: /(?<=trailing:.{0,50})\i\.Fragment,\{(?=.+?className:(\i))/, + replace: "$self.TrailingWrapper,{className:$1," } } ], - renderVencordPopoutButton: (buttonClass: string) => ( - - - - ) + TrailingWrapper({ children, className }: PropsWithChildren<{ className: string; }>) { + return ( + <> + {children} + + + + + ); + }, });