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
3 changed files with 24 additions and 6 deletions
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 definePlugin from "../utils/types";
|
||||||
|
import { Devs } from "../utils/constants";
|
||||||
|
|
||||||
export default definePlugin({
|
export default definePlugin({
|
||||||
name: "RandomiseFileNames",
|
name: "RandomiseFileNames",
|
||||||
authors: [
|
authors: [Devs.obscurity],
|
||||||
{
|
|
||||||
name: "obscurity",
|
|
||||||
id: 336678828233588736n,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
description: "Randomise uploaded file names",
|
description: "Randomise uploaded file names",
|
||||||
patches: [
|
patches: [
|
||||||
{
|
{
|
||||||
|
|
|
@ -22,5 +22,9 @@ export const Devs = Object.freeze({
|
||||||
botato: {
|
botato: {
|
||||||
name: "botato",
|
name: "botato",
|
||||||
id: 440990343899643943n
|
id: 440990343899643943n
|
||||||
|
},
|
||||||
|
obscurity: {
|
||||||
|
name: "obscurity",
|
||||||
|
id: 336678828233588736n,
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue