Plugin

UnlockedAvatarZoom

Allows you to zoom in further in the image crop tool when changing your avatar

Media Utility
index.ts
Download

Source

src/plugins/unlockedAvatarZoom/index.ts
1import { definePluginSettings } from "@api/Settings";
2import { Devs } from "@utils/constants";
3import definePlugin, { makeRange, OptionType } from "@utils/types";
4
5const settings = definePluginSettings({
6 zoomMultiplier: {
7 type: OptionType.SLIDER,
8 description: "Zoom multiplier",
9 markers: makeRange(2, 16),
10 default: 4,
11 },
12});
13
14export default definePlugin({
15 name: "UnlockedAvatarZoom",
16 description: "Allows you to zoom in further in the image crop tool when changing your avatar",
17 tags: ["Media", "Utility"],
18 authors: [Devs.nakoyasha],
19 settings,
20 patches: [
21 {
22 find: "#{intl::AVATAR_UPLOAD_EDIT_MEDIA}",
23 replacement: {
24 match: /maxValue:\d/,
25 replace: "maxValue:$self.settings.store.zoomMultiplier",
26 }
27 }
28 ]
29});
30