aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/viewIcons.tsx
diff options
context:
space:
mode:
authorVendicated <vendicated@riseup.net>2022-09-15 18:03:48 +0200
committerVendicated <vendicated@riseup.net>2022-09-15 18:03:48 +0200
commitb1d3f5e52fc7592907a3a18d5bce3f3b785e4985 (patch)
treef6ebec82a116d1ec452e3e1c751f0d8acadb5ac5 /src/plugins/viewIcons.tsx
parent5b2b91ed0d3ceac914c0dbb56905b87e12657c7a (diff)
downloadVencord-b1d3f5e52fc7592907a3a18d5bce3f3b785e4985.tar.gz
Vencord-b1d3f5e52fc7592907a3a18d5bce3f3b785e4985.tar.bz2
Vencord-b1d3f5e52fc7592907a3a18d5bce3f3b785e4985.zip
Fix settings patch
Diffstat (limited to 'src/plugins/viewIcons.tsx')
-rw-r--r--src/plugins/viewIcons.tsx11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/plugins/viewIcons.tsx b/src/plugins/viewIcons.tsx
index 218b4ed..433c1e5 100644
--- a/src/plugins/viewIcons.tsx
+++ b/src/plugins/viewIcons.tsx
@@ -1,4 +1,3 @@
-import { REACT_GLOBAL } from "../utils/constants";
import { Modal, openModal } from "../utils/modal";
import definePlugin from '../utils/types';
import { filters, waitFor } from "../webpack";
@@ -48,11 +47,11 @@ export default definePlugin({
},
{
match: /,(.{1,2})\((.{1,2})\.MenuGroup,\{\},void 0,(.{1,2})\)(?=\)\}.{1,2}\.displayName)/,
- replace: (_, factory, menu, copyIdElement) => `,${factory}(${menu}.MenuGroup,{},void 0,[` +
- `_guild.icon&&${REACT_GLOBAL}.createElement(${menu}.MenuItem,` +
- `{key:"viewicons-copy-icon",id:"viewicons-copy-icon",action:()=>${OPEN_URL}_guild.getIconURL(undefined,true)+"size=2048"),label:"View Icon",icon:null}),` +
- `_guild.banner&&${REACT_GLOBAL}.createElement(${menu}.MenuItem,` +
- `{key:"viewicons-copy-banner",id:"viewicons-copy-banner",action:()=>${OPEN_URL}Vencord.Webpack.findByProps("getGuildBannerURL").getGuildBannerURL(_guild).replace(/\\?size=.+/, "?size=2048")),label:"View Banner",icon:null}),${copyIdElement}])`
+ replace: (_, createElement, menu, copyIdElement) => `,${createElement}(${menu}.MenuGroup,{},void 0,[` +
+ `_guild.icon&&${createElement}(${menu}.MenuItem,` +
+ `{id:"viewicons-copy-icon",label:"View Icon",action:()=>${OPEN_URL}_guild.getIconURL(void 0,true)+"size=2048")}),` +
+ `_guild.banner&&${createElement}(${menu}.MenuItem,` +
+ `{id:"viewicons-copy-banner",label:"View Banner",action:()=>${OPEN_URL}Vencord.Webpack.findByProps("getGuildBannerURL").getGuildBannerURL(_guild).replace(/\\?size=.+/, "?size=2048"))}),${copyIdElement}])`
}
]
}