diff options
author | obscurity <z@x4.pm> | 2022-10-03 20:43:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-03 20:43:25 +0200 |
commit | f2d913c6723d9ede949a576f473f1fc4902b614e (patch) | |
tree | 515a6cad81bb0616d8147df1f7a6d17323b27c71 /src | |
parent | 8fe60971f5939876da1cf228a3bb27c0e627c5ac (diff) | |
download | Vencord-f2d913c6723d9ede949a576f473f1fc4902b614e.tar.gz Vencord-f2d913c6723d9ede949a576f473f1fc4902b614e.tar.bz2 Vencord-f2d913c6723d9ede949a576f473f1fc4902b614e.zip |
feat(plugin): add betterUploadButton (#32)
plugin to upload with a single click and open the context menu with right click
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/betterUploadButton.ts | 18 | ||||
-rw-r--r-- | src/plugins/randomiseFileNames.ts | 8 | ||||
-rw-r--r-- | src/utils/constants.ts | 4 |
3 files changed, 24 insertions, 6 deletions
diff --git a/src/plugins/betterUploadButton.ts b/src/plugins/betterUploadButton.ts new file mode 100644 index 0000000..f2d2512 --- /dev/null +++ b/src/plugins/betterUploadButton.ts @@ -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}}", + }, + }, + ], +}); diff --git a/src/plugins/randomiseFileNames.ts b/src/plugins/randomiseFileNames.ts index 687b288..eeaef3a 100644 --- a/src/plugins/randomiseFileNames.ts +++ b/src/plugins/randomiseFileNames.ts @@ -1,13 +1,9 @@ import definePlugin from "../utils/types"; +import { Devs } from "../utils/constants"; export default definePlugin({ name: "RandomiseFileNames", - authors: [ - { - name: "obscurity", - id: 336678828233588736n, - }, - ], + authors: [Devs.obscurity], description: "Randomise uploaded file names", patches: [ { diff --git a/src/utils/constants.ts b/src/utils/constants.ts index 29ba6fa..9f7374d 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -22,5 +22,9 @@ export const Devs = Object.freeze({ botato: { name: "botato", id: 440990343899643943n + }, + obscurity: { + name: "obscurity", + id: 336678828233588736n, } }); |