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:
parent
8fe60971f5
commit
f2d913c672
18
src/plugins/betterUploadButton.ts
Normal file
18
src/plugins/betterUploadButton.ts
Normal 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}}",
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
@ -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: [
|
||||
{
|
||||
|
@ -22,5 +22,9 @@ export const Devs = Object.freeze({
|
||||
botato: {
|
||||
name: "botato",
|
||||
id: 440990343899643943n
|
||||
},
|
||||
obscurity: {
|
||||
name: "obscurity",
|
||||
id: 336678828233588736n,
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user