aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.eslintrc.json4
-rw-r--r--browser/Vencord.ts2
-rw-r--r--browser/background.js18
-rw-r--r--browser/content.js19
-rw-r--r--browser/userscript.meta.js34
-rwxr-xr-xscripts/build/build.mjs18
-rwxr-xr-x[-rw-r--r--]scripts/build/buildWeb.mjs20
-rw-r--r--scripts/build/common.mjs18
-rwxr-xr-x[-rw-r--r--]scripts/patcher/install.js1
-rwxr-xr-x[-rw-r--r--]scripts/patcher/uninstall.js1
-rw-r--r--src/api/MessageAccessories.ts18
-rw-r--r--src/plugins/apiMessageAccessories.ts18
12 files changed, 113 insertions, 58 deletions
diff --git a/.eslintrc.json b/.eslintrc.json
index 63be05b..7de658b 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -1,7 +1,7 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
- "ignorePatterns": ["dist"],
+ "ignorePatterns": ["dist", "browser"],
"plugins": ["header"],
"rules": {
// Since it's only been a month and Vencord has already been stolen
@@ -13,7 +13,7 @@
[
{
"pattern": "!?",
- "template": ""
+ "template": " "
},
" * Vencord, a modification for Discord's desktop app",
{
diff --git a/browser/Vencord.ts b/browser/Vencord.ts
index 24976a1..ab27f16 100644
--- a/browser/Vencord.ts
+++ b/browser/Vencord.ts
@@ -1,4 +1,4 @@
-/*
+/*!
* Vencord, a modification for Discord's desktop app
* Copyright (c) 2022 Vendicated and contributors
*
diff --git a/browser/background.js b/browser/background.js
index 5ffe8e8..b79c94e 100644
--- a/browser/background.js
+++ b/browser/background.js
@@ -1,21 +1,3 @@
-/*
- * Vencord, a modification for Discord's desktop app
- * Copyright (c) 2022 Vendicated and contributors
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
-*/
-
if (typeof browser === "undefined") {
var browser = chrome;
}
diff --git a/browser/content.js b/browser/content.js
index 8abf653..2c4b40e 100644
--- a/browser/content.js
+++ b/browser/content.js
@@ -1,22 +1,3 @@
-/*
- * Vencord, a modification for Discord's desktop app
- * Copyright (c) 2022 Vendicated and contributors
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
-*/
-
-
if (typeof browser === "undefined") {
var browser = chrome;
}
diff --git a/browser/userscript.meta.js b/browser/userscript.meta.js
index 0a73bc0..81cf3e7 100644
--- a/browser/userscript.meta.js
+++ b/browser/userscript.meta.js
@@ -1,20 +1,20 @@
-/*
- * Vencord, a modification for Discord's desktop app
- * Copyright (c) 2022 Vendicated and contributors
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
-*/
+// ==UserScript==
+// @name Vencord
+// @description A Discord client mod - Web version
+// @version %version%
+// @author Vendicated (https://github.com/Vendicated)
+// @namespace https://github.com/Vendicated/Vencord
+// @supportURL https://github.com/Vendicated/Vencord
+// @license GPL-3.0
+// @match *://*.discord.com/*
+// @grant none
+// @run-at document-start
+// @compatible chrome Chrome + Tampermonkey or Violentmonkey
+// @compatible firefox Firefox Tampermonkey
+// @compatible opera Opera + Tampermonkey or Violentmonkey
+// @compatible edge Edge + Tampermonkey or Violentmonkey
+// @compatible safari Safari + Tampermonkey or Violentmonkey
+// ==/UserScript==
// this UserScript DOES NOT work on Firefox with Violentmonkey or Greasemonkey due to a bug that makes it impossible
diff --git a/scripts/build/build.mjs b/scripts/build/build.mjs
index 73d220d..f6304b1 100755
--- a/scripts/build/build.mjs
+++ b/scripts/build/build.mjs
@@ -1,4 +1,22 @@
#!/usr/bin/node
+/*
+ * Vencord, a modification for Discord's desktop app
+ * Copyright (c) 2022 Vendicated and contributors
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+*/
+
import esbuild from "esbuild";
import { commonOpts, gitHashPlugin, globPlugins, makeAllPackagesExternalPlugin } from "./common.mjs";
diff --git a/scripts/build/buildWeb.mjs b/scripts/build/buildWeb.mjs
index 6299398..8abac2c 100644..100755
--- a/scripts/build/buildWeb.mjs
+++ b/scripts/build/buildWeb.mjs
@@ -1,4 +1,22 @@
-// TODO: Modularise the plugins since both build scripts use them
+#!/usr/bin/node
+/*
+ * Vencord, a modification for Discord's desktop app
+ * Copyright (c) 2022 Vendicated and contributors
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+*/
+
import { createWriteStream, readFileSync } from "fs";
import yazl from "yazl";
diff --git a/scripts/build/common.mjs b/scripts/build/common.mjs
index 0def0c2..6143fb2 100644
--- a/scripts/build/common.mjs
+++ b/scripts/build/common.mjs
@@ -1,3 +1,21 @@
+/*
+ * Vencord, a modification for Discord's desktop app
+ * Copyright (c) 2022 Vendicated and contributors
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+*/
+
import { execSync } from "child_process";
import esbuild from "esbuild";
import { existsSync } from "fs";
diff --git a/scripts/patcher/install.js b/scripts/patcher/install.js
index 90e1dbb..7fd3a8c 100644..100755
--- a/scripts/patcher/install.js
+++ b/scripts/patcher/install.js
@@ -1,3 +1,4 @@
+#!/usr/bin/node
/*
* Vencord, a modification for Discord's desktop app
* Copyright (c) 2022 Vendicated and contributors
diff --git a/scripts/patcher/uninstall.js b/scripts/patcher/uninstall.js
index 942375b..e9764a7 100644..100755
--- a/scripts/patcher/uninstall.js
+++ b/scripts/patcher/uninstall.js
@@ -1,3 +1,4 @@
+#!/usr/bin/node
/*
* Vencord, a modification for Discord's desktop app
* Copyright (c) 2022 Vendicated and contributors
diff --git a/src/api/MessageAccessories.ts b/src/api/MessageAccessories.ts
index 3a46828..ee74af5 100644
--- a/src/api/MessageAccessories.ts
+++ b/src/api/MessageAccessories.ts
@@ -1,3 +1,21 @@
+/*
+ * Vencord, a modification for Discord's desktop app
+ * Copyright (c) 2022 Vendicated and contributors
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+*/
+
export type AccessoryCallback = (props: Record<string, any>) => JSX.Element;
export type Accessory = {
callback: AccessoryCallback;
diff --git a/src/plugins/apiMessageAccessories.ts b/src/plugins/apiMessageAccessories.ts
index a2e8e70..8d01810 100644
--- a/src/plugins/apiMessageAccessories.ts
+++ b/src/plugins/apiMessageAccessories.ts
@@ -1,3 +1,21 @@
+/*
+ * Vencord, a modification for Discord's desktop app
+ * Copyright (c) 2022 Vendicated and contributors
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+*/
+
import { Devs } from "../utils/constants";
import definePlugin from "../utils/types";