Publish 'HoldGIFSend'
This commit is contained in:
parent
41bad09587
commit
c26905ff30
5 changed files with 45 additions and 3 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -5,5 +5,4 @@ pnpm-lock.yaml
|
||||||
yarn.lock
|
yarn.lock
|
||||||
package-lock.json
|
package-lock.json
|
||||||
Themer
|
Themer
|
||||||
FunnyBackground
|
RealThemer
|
||||||
YouTabRemover
|
|
||||||
|
|
|
||||||
29
make.mjs
Normal file
29
make.mjs
Normal file
|
|
@ -0,0 +1,29 @@
|
||||||
|
import * as fs from "fs";
|
||||||
|
import { argv } from "process";
|
||||||
|
|
||||||
|
const pluginName = [...argv].pop();
|
||||||
|
|
||||||
|
if (fs.existsSync(`./plugins/${pluginName}`)) {
|
||||||
|
console.warn(`Plugin named ${pluginName} already exists!`);
|
||||||
|
}
|
||||||
|
|
||||||
|
fs.mkdirSync(`./plugins/${pluginName}/src`, { recursive: true });
|
||||||
|
|
||||||
|
if (fs.existsSync(`./plugins/${pluginName}/manifest.json`)) {
|
||||||
|
throw new Error(`${pluginName} already got manifest!`);
|
||||||
|
}
|
||||||
|
|
||||||
|
fs.writeFileSync(
|
||||||
|
`./plugins/${pluginName}/manifest.json`,
|
||||||
|
JSON.stringify({
|
||||||
|
name: pluginName,
|
||||||
|
description: null,
|
||||||
|
vendetta: {}
|
||||||
|
}, null, 4)
|
||||||
|
);
|
||||||
|
|
||||||
|
fs.writeFileSync(
|
||||||
|
`./plugins/${pluginName}/src/index.ts`,
|
||||||
|
"export default {};\n"
|
||||||
|
);
|
||||||
|
|
||||||
|
|
@ -2,7 +2,8 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "node build.mjs",
|
"build": "node build.mjs",
|
||||||
"watch": "node build.mjs -w",
|
"watch": "node build.mjs -w",
|
||||||
"lint": "eslint plugins"
|
"lint": "eslint plugins",
|
||||||
|
"make": "node make.mjs"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@rollup/plugin-commonjs": "^24.1.0",
|
"@rollup/plugin-commonjs": "^24.1.0",
|
||||||
|
|
|
||||||
7
plugins/HoldGIFSend/manifest.json
Normal file
7
plugins/HoldGIFSend/manifest.json
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"name": "HoldGIFSend",
|
||||||
|
"description": "Hold GIF links to chat input before sending them.",
|
||||||
|
"vendetta": {
|
||||||
|
"icon": "gif"
|
||||||
|
}
|
||||||
|
}
|
||||||
6
plugins/HoldGIFSend/src/index.ts
Normal file
6
plugins/HoldGIFSend/src/index.ts
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
import { findByProps } from "@vendetta/metro";
|
||||||
|
import { instead } from "@vendetta/patcher";
|
||||||
|
|
||||||
|
const messageInputUtil = findByProps("selectGIF");
|
||||||
|
|
||||||
|
export const unLoad = instead("selectGIF", messageInputUtil, ([{ url }]) => messageInputUtil.insertText(url));
|
||||||
Loading…
Add table
Reference in a new issue