feat(plugin): ImageLink (#2297)
This commit is contained in:
parent
520e915168
commit
0350db7690
2 changed files with 27 additions and 0 deletions
3
src/plugins/imageLink/README.md
Normal file
3
src/plugins/imageLink/README.md
Normal file
|
@ -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.
|
24
src/plugins/imageLink/index.ts
Normal file
24
src/plugins/imageLink/index.ts
Normal file
|
@ -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",
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
Loading…
Reference in a new issue