added SelfShopPreview
This commit is contained in:
parent
89ded967ce
commit
f6d3312244
1 changed files with 30 additions and 0 deletions
30
src/userplugins/SelfShopPreview/index.tsx
Normal file
30
src/userplugins/SelfShopPreview/index.tsx
Normal 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();
|
||||
}
|
Loading…
Reference in a new issue