added SelfShopPreview

This commit is contained in:
Seaswimmer 2024-05-08 20:40:52 -04:00
parent 89ded967ce
commit f6d3312244
Signed by: cswimr
GPG key ID: 1EBC234EEDA901AE

View file

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