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(); +}