Plugin

NoMiddleClickPaste

Disable Linux middle-click paste - Linux only

index.ts
Download

Source

src/plugins/noMiddleClickPaste/index.ts
1/*
2 * FiveCord — a Discord client mod
3 * Copyright (c) 2025 FiveCord
4 * SPDX-License-Identifier: GPL-3.0-or-later
5 */
6
7import { Devs, IS_LINUX } from "@utils/constants";
8import definePlugin from "@utils/types";
9
10function preventMiddleClick(e: MouseEvent) {
11 if (e.button === 1) {
12 e.preventDefault();
13 }
14}
15
16export default definePlugin({
17 name: "NoMiddleClickPaste",
18 description: "Disable Linux middle-click paste - Linux only",
19 authors: [Devs.Darxoon],
20 hidden: !IS_LINUX,
21
22 start() {
23 window.addEventListener("mouseup", preventMiddleClick);
24 },
25
26 stop() {
27 window.removeEventListener("mouseup", preventMiddleClick);
28 },
29});
30