aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/betterUploadButton.ts
blob: f2d2512c415e251793a780fe49e943cb6ef71315 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import definePlugin from "../utils/types";
import { Devs } from "../utils/constants";

export default definePlugin({
    name: "BetterUploadButton",
    authors: [Devs.obscurity],
    description: "Upload with a single click, open menu with right click",
    patches: [
        {
            find: "Messages.CHAT_ATTACH_UPLOAD_OR_INVITE",
            replacement: {
                match: /CHAT_ATTACH_UPLOAD_OR_INVITE,onDoubleClick:([^,]+),onClick:([^,]+)}}/,
                replace:
                    "CHAT_ATTACH_UPLOAD_OR_INVITE,onClick:$1,onContextMenu:$2}}",
            },
        },
    ],
});