feat(plugin): add betterUploadButton (#32)

plugin to upload with a single click and open the context menu with right click
This commit is contained in:
obscurity
2022-10-03 20:43:25 +02:00
committed by GitHub
parent 8fe60971f5
commit f2d913c672
3 changed files with 24 additions and 6 deletions

View File

@ -0,0 +1,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}}",
},
},
],
});