Fix settings patch
This commit is contained in:
parent
5b2b91ed0d
commit
b1d3f5e52f
@ -16,7 +16,7 @@ export default definePlugin({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
match: /\w\.createElement.+?["']Host ["'].+?\):null/,
|
match: /\w\.createElement.+?["']Host ["'].+?\):null/s,
|
||||||
replace: m => {
|
replace: m => {
|
||||||
const idx = m.indexOf("Host") - 1;
|
const idx = m.indexOf("Host") - 1;
|
||||||
const template = m.slice(0, idx);
|
const template = m.slice(0, idx);
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
import { REACT_GLOBAL } from "../utils/constants";
|
|
||||||
import { Modal, openModal } from "../utils/modal";
|
import { Modal, openModal } from "../utils/modal";
|
||||||
import definePlugin from '../utils/types';
|
import definePlugin from '../utils/types';
|
||||||
import { filters, waitFor } from "../webpack";
|
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)/,
|
match: /,(.{1,2})\((.{1,2})\.MenuGroup,\{\},void 0,(.{1,2})\)(?=\)\}.{1,2}\.displayName)/,
|
||||||
replace: (_, factory, menu, copyIdElement) => `,${factory}(${menu}.MenuGroup,{},void 0,[` +
|
replace: (_, createElement, menu, copyIdElement) => `,${createElement}(${menu}.MenuGroup,{},void 0,[` +
|
||||||
`_guild.icon&&${REACT_GLOBAL}.createElement(${menu}.MenuItem,` +
|
`_guild.icon&&${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}),` +
|
`{id:"viewicons-copy-icon",label:"View Icon",action:()=>${OPEN_URL}_guild.getIconURL(void 0,true)+"size=2048")}),` +
|
||||||
`_guild.banner&&${REACT_GLOBAL}.createElement(${menu}.MenuItem,` +
|
`_guild.banner&&${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}])`
|
`{id:"viewicons-copy-banner",label:"View Banner",action:()=>${OPEN_URL}Vencord.Webpack.findByProps("getGuildBannerURL").getGuildBannerURL(_guild).replace(/\\?size=.+/, "?size=2048"))}),${copyIdElement}])`
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user