aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/plugins/betterUploadButton.ts18
-rw-r--r--src/plugins/randomiseFileNames.ts8
-rw-r--r--src/utils/constants.ts4
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,
}
});