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}
+
+
+
+ >
+ );
+ },
});