diff options
author | Vendicated <vendicated@riseup.net> | 2022-11-02 17:30:15 +0100 |
---|---|---|
committer | Vendicated <vendicated@riseup.net> | 2022-11-02 17:30:15 +0100 |
commit | 676f5c7e30d5222d767e01c631ac45e8cbfbccfe (patch) | |
tree | a98f4a06dc079cdc5656c314735f4e3e4f452c25 /src/plugins/viewIcons.tsx | |
parent | 13c73699e98196ae57dd5fbd9ee5e47366055ab3 (diff) | |
download | Vencord-676f5c7e30d5222d767e01c631ac45e8cbfbccfe.tar.gz Vencord-676f5c7e30d5222d767e01c631ac45e8cbfbccfe.tar.bz2 Vencord-676f5c7e30d5222d767e01c631ac45e8cbfbccfe.zip |
ViewIcons: size 2048 -> 512, to fit on screen
Diffstat (limited to 'src/plugins/viewIcons.tsx')
-rw-r--r-- | src/plugins/viewIcons.tsx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/viewIcons.tsx b/src/plugins/viewIcons.tsx index 77372cb..3ea9afa 100644 --- a/src/plugins/viewIcons.tsx +++ b/src/plugins/viewIcons.tsx @@ -51,13 +51,13 @@ export default definePlugin({ replacement: { // global because Discord has two components that are 99% identical with one small change ._. match: /\{src:(.{1,2}),avatarDecoration/g, - replace: (_, src) => `{src:${src},onClick:()=>${OPEN_URL}${src}.replace(/\\?.+$/, "")+"?size=2048"),avatarDecoration` + replace: (_, src) => `{src:${src},onClick:()=>${OPEN_URL}${src}.replace(/\\?.+$/, "")+"?size=512"),avatarDecoration` } }, { find: "().popoutNoBannerPremium", replacement: { match: /style:.{0,10}\{\},(.{1,2})\)/, - replace: (m, style) => `onClick:${style}.backgroundImage&&(${style}.cursor="pointer",()=>${OPEN_URL}${style}.backgroundImage.replace("url(", "").replace(/(\\?size=.+)?\\)/, "?size=2048"))),${m}` + replace: (m, style) => `onClick:${style}.backgroundImage&&(${style}.cursor="pointer",()=>${OPEN_URL}${style}.backgroundImage.replace("url(", "").replace(/(\\?size=.+)?\\)/, "?size=512"))),${m}` } }, { find: '"GuildContextMenu:', @@ -71,9 +71,9 @@ export default definePlugin({ replace: (_, menu, createElement, menuGroup, copyIdElement) => `${createElement}(${menuGroup},null,[` + `_guild.icon&&${createElement}(${menu},` + - `{id:"viewicons-copy-icon",label:"View Icon",action:()=>${OPEN_URL}_guild.getIconURL(void 0,true)+"size=2048")}),` + + `{id:"viewicons-copy-icon",label:"View Icon",action:()=>${OPEN_URL}_guild.getIconURL(void 0,true)+"size=512")}),` + `_guild.banner&&${createElement}(${menu},` + - `{id:"viewicons-copy-banner",label:"View Banner",action:()=>${OPEN_URL}Vencord.Webpack.findByProps("getGuildBannerURL").getGuildBannerURL(_guild).replace(/\\?size=.+/, "?size=2048"))})` + `{id:"viewicons-copy-banner",label:"View Banner",action:()=>${OPEN_URL}Vencord.Webpack.findByProps("getGuildBannerURL").getGuildBannerURL(_guild).replace(/\\?size=.+/, "?size=512"))})` + `,${copyIdElement}])` } ] |