|
|
|
@ -21,7 +21,7 @@ import type { Guild } from "discord-types/general";
|
|
|
|
|
import { Devs } from "../utils/constants";
|
|
|
|
|
import { LazyComponent, lazyWebpack } from "../utils/misc";
|
|
|
|
|
import { ModalRoot, ModalSize, openModal } from "../utils/modal";
|
|
|
|
|
import definePlugin from "../utils/types";
|
|
|
|
|
import { PluginDef } from "../utils/types";
|
|
|
|
|
import { filters, find } from "../webpack";
|
|
|
|
|
import { Menu } from "../webpack/common";
|
|
|
|
|
|
|
|
|
@ -31,12 +31,12 @@ const MaskedLink = LazyComponent(() => find(m => m.type?.toString().includes("MA
|
|
|
|
|
const GuildBannerStore = lazyWebpack(filters.byProps("getGuildBannerURL"));
|
|
|
|
|
|
|
|
|
|
const OPEN_URL = "Vencord.Plugins.plugins.ViewIcons.openImage(";
|
|
|
|
|
export default definePlugin({
|
|
|
|
|
name: "ViewIcons",
|
|
|
|
|
authors: [Devs.Ven],
|
|
|
|
|
description: "Makes Avatars/Banners in user profiles clickable, and adds Guild Context Menu Entries to View Banner/Icon.",
|
|
|
|
|
export default new class ViewIcons implements PluginDef {
|
|
|
|
|
name = "ViewIcons";
|
|
|
|
|
authors = [Devs.Ven];
|
|
|
|
|
description = "Makes Avatars/Banners in user profiles clickable, and adds Guild Context Menu Entries to View Banner/Icon.";
|
|
|
|
|
|
|
|
|
|
dependencies: ["MenuItemDeobfuscatorApi"],
|
|
|
|
|
dependencies = ["MenuItemDeobfuscatorApi"];
|
|
|
|
|
|
|
|
|
|
openImage(url: string) {
|
|
|
|
|
const u = new URL(url);
|
|
|
|
@ -53,9 +53,9 @@ export default definePlugin({
|
|
|
|
|
/>
|
|
|
|
|
</ModalRoot>
|
|
|
|
|
));
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
patches: [
|
|
|
|
|
patches = [
|
|
|
|
|
{
|
|
|
|
|
find: "onAddFriend:",
|
|
|
|
|
replacement: {
|
|
|
|
@ -84,7 +84,7 @@ export default definePlugin({
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
buildGuildContextMenuEntries(guild: Guild) {
|
|
|
|
|
return (
|
|
|
|
@ -108,4 +108,4 @@ export default definePlugin({
|
|
|
|
|
</Menu.MenuGroup>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|