diff options
Diffstat (limited to 'src/plugins/viewIcons.tsx')
-rw-r--r-- | src/plugins/viewIcons.tsx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/viewIcons.tsx b/src/plugins/viewIcons.tsx index d6cbf60..ca106ae 100644 --- a/src/plugins/viewIcons.tsx +++ b/src/plugins/viewIcons.tsx @@ -31,14 +31,15 @@ export default definePlugin({ { find: "onAddFriend:", replacement: { - match: /\{src:(.{1,2}),avatarDecoration/, + // 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` } }, { find: "().popoutNoBannerPremium", replacement: { match: /style:.{0,10}\{\},(.{1,2})\)/, - replace: (m, bannerObj) => `onClick:${bannerObj}.backgroundImage&&(()=>${OPEN_URL}${bannerObj}.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=2048"))),${m}` } }, { find: '"GuildContextMenu:', |