mirror of
https://github.com/Vendicated/Vencord.git
synced 2025-01-26 17:26:22 +00:00
24 lines
667 B
TypeScript
24 lines
667 B
TypeScript
|
/*
|
||
|
* Vencord, a Discord client mod
|
||
|
* Copyright (c) 2023 Vendicated and contributors
|
||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||
|
*/
|
||
|
|
||
|
import { Devs } from "@utils/constants.js";
|
||
|
import definePlugin from "@utils/types";
|
||
|
|
||
|
export default definePlugin({
|
||
|
name: "NoMaskedUrlPaste",
|
||
|
authors: [Devs.CatNoir],
|
||
|
description: "Pasting a link while having text selected will not paste as masked URL",
|
||
|
patches: [
|
||
|
{
|
||
|
find: ".selection,preventEmojiSurrogates:",
|
||
|
replacement: {
|
||
|
match: /if\(null!=\i.selection&&\i.\i.isExpanded\(\i.selection\)\)/,
|
||
|
replace: "if(false)"
|
||
|
}
|
||
|
}
|
||
|
],
|
||
|
});
|