mirror of
https://github.com/Vendicated/Vencord.git
synced 2025-02-23 23:15:10 +00:00
SwitchProfileButton: Fix patch... in a horrible way
This commit is contained in:
parent
0a45c4e6e4
commit
b2e87e64be
1 changed files with 3 additions and 7 deletions
|
@ -7,6 +7,7 @@
|
|||
import ErrorBoundary from "@components/ErrorBoundary";
|
||||
import { Devs } from "@utils/constants";
|
||||
import { classes } from "@utils/misc";
|
||||
import { canonicalizeMatch } from "@utils/patches";
|
||||
import definePlugin from "@utils/types";
|
||||
import { findByPropsLazy } from "@webpack";
|
||||
import { Button, Text, TooltipContainer } from "@webpack/common";
|
||||
|
@ -29,15 +30,10 @@ export default definePlugin({
|
|||
patches: [
|
||||
{
|
||||
find: ".FULL_SIZE,user:",
|
||||
group: true,
|
||||
replacement: [
|
||||
{
|
||||
match: /\(\i\.MenuItem(,{id:"view-)/g,
|
||||
replace: "($self.SwitchProfileButton$1"
|
||||
},
|
||||
{
|
||||
match: /(\(0,\i\.jsx\)\(.{0,30}viewProfileItem:)(\i\(\))}\)/,
|
||||
replace: "$2,$1null})"
|
||||
match: /(\(0,\i\.jsx\)\(.{0,30}viewProfileItem:)(.{0,850}?\}\))\}\)\]/,
|
||||
replace: (_, overflowMenu, viewProfileItem) => `${viewProfileItem.replaceAll(canonicalizeMatch(/\(\i\.\i(,{id:"view-)/g), "($self.SwitchProfileButton$1")},${overflowMenu}null})]`
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue