mirror of
https://github.com/Equicord/Equicord.git
synced 2025-01-18 05:13:29 -05:00
Remove unmaintained plugins from Equicord (#122)
* remove DisableAnimations from the list of plugins in README.md * remove GrammarFix plugin from the list in README.md * remove DisableAnimations plugin from the project * remove GrammarFix plugin implementation * remove seth from EquicordDevs constants * Update README.md
This commit is contained in:
parent
dda7e8e166
commit
602e765743
4 changed files with 1 additions and 158 deletions
|
@ -10,7 +10,7 @@ You can join our [discord server](https://discord.gg/5Xh2W87egW) for commits, ch
|
|||
|
||||
### Extra included plugins
|
||||
<details>
|
||||
<summary>151 additional plugins</summary>
|
||||
<summary>149 additional plugins</summary>
|
||||
|
||||
### All Platforms
|
||||
- AllCallTimers by MaxHerbold & D3SOX
|
||||
|
@ -44,7 +44,6 @@ You can join our [discord server](https://discord.gg/5Xh2W87egW) for commits, ch
|
|||
- DecodeBase64 by ThePirateStoner
|
||||
- DeadMembers by Kyuuhachi
|
||||
- Demonstration by Samwich
|
||||
- DisableAnimations by S€th
|
||||
- DisableCameras by Joona
|
||||
- DoNotLeak by Perny
|
||||
- DontFilterMe by Samwich
|
||||
|
@ -66,7 +65,6 @@ You can join our [discord server](https://discord.gg/5Xh2W87egW) for commits, ch
|
|||
- GodMode by Tolgchu
|
||||
- GoodPerson by nin0dev & mantikafasi
|
||||
- GoogleThat by Samwich
|
||||
- GrammarFix by S€th
|
||||
- HideChatButtons by iamme
|
||||
- HideMessage by Hanzy
|
||||
- HideServers by bepvte
|
||||
|
|
|
@ -1,53 +0,0 @@
|
|||
/*
|
||||
* 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 { EquicordDevs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
import { findAll } from "@webpack";
|
||||
|
||||
export default definePlugin({
|
||||
name: "DisableAnimations",
|
||||
description: "Disables most of Discord's animations.",
|
||||
authors: [EquicordDevs.seth],
|
||||
start() {
|
||||
this.springs = findAll(mod => {
|
||||
if (!mod.Globals) return false;
|
||||
return true;
|
||||
});
|
||||
|
||||
for (const spring of this.springs) {
|
||||
spring.Globals.assign({
|
||||
skipAnimation: true,
|
||||
});
|
||||
}
|
||||
|
||||
this.css = document.createElement("style");
|
||||
this.css.innerText = "* { transition: none !important; animation: none !important; }";
|
||||
|
||||
document.head.appendChild(this.css);
|
||||
},
|
||||
stop() {
|
||||
for (const spring of this.springs) {
|
||||
spring.Globals.assign({
|
||||
skipAnimation: false,
|
||||
});
|
||||
}
|
||||
|
||||
if (this.css) this.css.remove();
|
||||
}
|
||||
});
|
|
@ -1,98 +0,0 @@
|
|||
/*
|
||||
* Vencord, a Discord client mod
|
||||
* Copyright (c) 2024 Vendicated and contributors
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
import {
|
||||
addPreSendListener,
|
||||
removePreSendListener,
|
||||
SendListener,
|
||||
} from "@api/MessageEvents";
|
||||
import { definePluginSettings } from "@api/Settings";
|
||||
import { EquicordDevs } from "@utils/constants";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
|
||||
const settings = definePluginSettings({
|
||||
autoCapitalization: {
|
||||
type: OptionType.BOOLEAN,
|
||||
description: "Auto Capitalization to the first letter",
|
||||
},
|
||||
autoPunctuation: {
|
||||
type: OptionType.BOOLEAN,
|
||||
description: "Auto Punctuation at the end of a sentence",
|
||||
},
|
||||
autoWordReplacement: {
|
||||
type: OptionType.BOOLEAN,
|
||||
description: "Auto Capitalizes the first letter",
|
||||
},
|
||||
});
|
||||
|
||||
const getPresend = dictionary => {
|
||||
const presendObject: SendListener = (_, msg) => {
|
||||
msg.content = msg.content.trim();
|
||||
if (!msg.content.includes("```") && /\w/.test(msg.content.charAt(0))) {
|
||||
if (settings.store.autoWordReplacement) {
|
||||
const re = new RegExp(
|
||||
`(^|(?<=[^A-Z0-9]+))(${Object.keys(dictionary)
|
||||
.map(k => k.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"))
|
||||
.join("|")})((?=[^A-Z0-9]+)|$)`,
|
||||
"gi",
|
||||
);
|
||||
if (re !== null) {
|
||||
msg.content = msg.content.replace(re, match => {
|
||||
return dictionary[match.toLowerCase()] || match;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (settings.store.autoPunctuation) {
|
||||
if (
|
||||
/[A-Z0-9]/i.test(msg.content.charAt(msg.content.length - 1))
|
||||
) {
|
||||
if (
|
||||
!msg.content.startsWith(
|
||||
"http",
|
||||
msg.content.lastIndexOf(" ") + 1,
|
||||
)
|
||||
)
|
||||
msg.content += ".";
|
||||
}
|
||||
}
|
||||
|
||||
// Ensure sentences are capitalized after punctuation
|
||||
if (settings.store.autoCapitalization) {
|
||||
msg.content = msg.content.replace(/([.!?])\s*(\w)/g, match =>
|
||||
match.toUpperCase(),
|
||||
);
|
||||
|
||||
// Ensure the first character of the entire message is capitalized
|
||||
if (!msg.content.startsWith("http")) {
|
||||
msg.content =
|
||||
msg.content.charAt(0).toUpperCase() +
|
||||
msg.content.slice(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
return presendObject;
|
||||
};
|
||||
|
||||
export default definePlugin({
|
||||
name: "GrammarFix",
|
||||
description: "Automatic punctuation, capitalization, and word replacement.",
|
||||
authors: [EquicordDevs.seth],
|
||||
dependencies: ["MessageEventsAPI"],
|
||||
settings,
|
||||
async start() {
|
||||
let dictionary = await fetch(
|
||||
"https://raw.githubusercontent.com/wont-stream/dictionary/6b9d2f06a1d89103fb7249f41de4db6811e3d374/index.min.json",
|
||||
);
|
||||
dictionary = await dictionary.json();
|
||||
|
||||
addPreSendListener(getPresend(dictionary));
|
||||
},
|
||||
stop() {
|
||||
removePreSendListener(getPresend({}));
|
||||
},
|
||||
});
|
|
@ -739,10 +739,6 @@ export const EquicordDevs = Object.freeze({
|
|||
name: "Prince527",
|
||||
id: 364105797162237952n
|
||||
},
|
||||
seth: {
|
||||
name: "S€th",
|
||||
id: 1273447359417942128n
|
||||
},
|
||||
ThePirateStoner: {
|
||||
name: "ThePirateStoner",
|
||||
id: 1196220620376121381n
|
||||
|
|
Loading…
Reference in a new issue