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:',