From f6d33122444c31877377019fcc7079600e57ba8e Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Wed, 8 May 2024 20:40:52 -0400 Subject: [PATCH] added SelfShopPreview --- src/userplugins/SelfShopPreview/index.tsx | 30 +++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/userplugins/SelfShopPreview/index.tsx diff --git a/src/userplugins/SelfShopPreview/index.tsx b/src/userplugins/SelfShopPreview/index.tsx new file mode 100644 index 00000000..567a0a97 --- /dev/null +++ b/src/userplugins/SelfShopPreview/index.tsx @@ -0,0 +1,30 @@ + +import { Devs } from "@utils/constants"; +import definePlugin, { OptionType } from "@utils/types"; +import { UserStore } from "@webpack/common"; + +export default definePlugin({ + name: "SelfShopPreview", + description: "Adds your own profile picture to the decorations in the shop", + + authors: + [ + Devs.Samwich + ], + + patches: [ + { + find: "className:G.avatarContainer,", + replacement: { + match: /src:er,/, + replace: 'src:$self.avatarUrl(),' + } + } + ], + avatarUrl: GetAvatarUrl + +}); + +function GetAvatarUrl() { + return UserStore.getCurrentUser().getAvatarURL(); +}