aboutsummaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorobscurity <z@x4.pm>2022-10-03 20:43:25 +0200
committerGitHub <noreply@github.com>2022-10-03 20:43:25 +0200
commitf2d913c6723d9ede949a576f473f1fc4902b614e (patch)
tree515a6cad81bb0616d8147df1f7a6d17323b27c71 /src/plugins
parent8fe60971f5939876da1cf228a3bb27c0e627c5ac (diff)
downloadVencord-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/plugins')
-rw-r--r--src/plugins/betterUploadButton.ts18
-rw-r--r--src/plugins/randomiseFileNames.ts8
2 files changed, 20 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: [
{