diff --git a/src/plugins/imageLink/README.md b/src/plugins/imageLink/README.md new file mode 100644 index 000000000..add657948 --- /dev/null +++ b/src/plugins/imageLink/README.md @@ -0,0 +1,3 @@ +# ImageLink + +If a message consists of only a link to an image, Discord hides the link and shows only the image embed. This plugin makes the link show regardless. diff --git a/src/plugins/imageLink/index.ts b/src/plugins/imageLink/index.ts new file mode 100644 index 000000000..73a977fa9 --- /dev/null +++ b/src/plugins/imageLink/index.ts @@ -0,0 +1,24 @@ +/* + * Vencord, a Discord client mod + * Copyright (c) 2024 Vendicated and contributors + * SPDX-License-Identifier: GPL-3.0-or-later + */ + +import { Devs } from "@utils/constants"; +import definePlugin from "@utils/types"; + +export default definePlugin({ + name: "ImageLink", + description: "Never hide image links in messages, even if it's the only content", + authors: [Devs.Kyuuhachi], + + patches: [ + { + find: "isEmbedInline:function()", + replacement: { + match: /(?<=isEmbedInline:function\(\)\{return )\i(?=\})/, + replace: "()=>false", + }, + }, + ], +});