From 5da4bd72a85661f48a0b7d7b76df2f7366813ac5 Mon Sep 17 00:00:00 2001 From: vMohammad <62218284+vMohammad24@users.noreply.github.com> Date: Wed, 11 Dec 2024 22:50:59 +0300 Subject: [PATCH 1/4] Added BetterPlusReacts plugin (#110) * Added BetterPlusReacts plugin * added betterplusreacts to the readme * Revert Count * Fix Authors --------- Co-authored-by: thororen <78185467+thororen1234@users.noreply.github.com> --- README.md | 1 + src/equicordplugins/betterplusreacts/index.ts | 61 +++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 src/equicordplugins/betterplusreacts/index.ts diff --git a/README.md b/README.md index 1109ae85..2146bb7e 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,7 @@ You can join our [discord server](https://discord.gg/5Xh2W87egW) for commits, ch - BetterInvites by iamme - BetterQuickReact by Ven & Sqaaakoi - BetterUserArea by Samwich +- BetterPlusReacts by Joona - BlockKeywords by catcraft - BlockKrsip by D3SOX - BypassStatus by Inbestigator & thororen diff --git a/src/equicordplugins/betterplusreacts/index.ts b/src/equicordplugins/betterplusreacts/index.ts new file mode 100644 index 00000000..5426dbcb --- /dev/null +++ b/src/equicordplugins/betterplusreacts/index.ts @@ -0,0 +1,61 @@ +/* + * Vencord, a Discord client mod + * Copyright (c) 2024 Vendicated and contributors + * SPDX-License-Identifier: GPL-3.0-or-later + */ + +// https://github.com/Masterjoona/vc-betterplusreacts/blob/main/index.ts +import { Devs } from "@utils/constants"; +import definePlugin from "@utils/types"; +import { findByPropsLazy } from "@webpack"; + +const { getMessages } = findByPropsLazy("getMessages"); + +export default definePlugin({ + name: "BetterPlusReacts", + authors: [Devs.Joona], + description: "The amount of plus before :emoji: is the message to add it to", + patches: [ + { + find: ".SLASH_COMMAND_USED,", + replacement: [ + { + match: /\\\+/, + replace: "$&*" + }, + { + match: /\i.trim\(\)/, + replace: "$&.replace(/^\\++/, '+')" + }, + { + match: /=(\i\.\i\.getMessages\(\i\.id\))\.last\(\)(?=.{78,85}.getByName\((\i)\.)/, + replace: "=$self.getMsgReference()" + } + ] + }, + { + find: "this.props.activeCommandOption,", + replacement: [ + // Enable auto complete for multiple plusses + // and set the message reference + { + match: /:this.props.currentWord/, + replace: "$&.replace(/^\\++/, '+')" + }, + { + match: /this.props.editorRef.current\)return;/, + replace: "$&$self.setMsgReference(this.props.currentWord.split(':')[0],this.props.channel.id);" + } + ] + }, + ], + message: null, + getMsgReference() { + const { message } = this; + this.message = null; + return message; + }, + setMsgReference(plusses: string, channelId: string) { + this.message = getMessages(channelId).getByIndex(getMessages(channelId).length - plusses.split("+").length + 1); + } +}); From 8f824472bc7c12e72866f12278639c9a2ab5d498 Mon Sep 17 00:00:00 2001 From: PhoenixAceVFX Date: Wed, 11 Dec 2024 14:52:59 -0500 Subject: [PATCH 2/4] Installer script changes (#108) * Update README.md Custom URLs for the install script * Update README.md Mirrors because running the script from github is giving me problems (ratelimit or something i have no clue) * Update install.sh * Update README.md * Fix Readme --------- Co-authored-by: thororen1234 Co-authored-by: thororen <78185467+thororen1234@users.noreply.github.com> --- README.md | 1 + misc/install.sh | 22 ++++++++++++++++------ 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 2146bb7e..8ed574d8 100644 --- a/README.md +++ b/README.md @@ -190,6 +190,7 @@ Linux ```shell sh -c "$(curl -sS https://raw.githubusercontent.com/Equicord/Equicord/refs/heads/main/misc/install.sh)" ``` + ## Installing Equicord Devbuild ### Dependencies diff --git a/misc/install.sh b/misc/install.sh index 3d760462..1ddcf677 100644 --- a/misc/install.sh +++ b/misc/install.sh @@ -1,36 +1,44 @@ #!/bin/sh + +# Exit immediately if a command exits with a non-zero status set -e +# Check if the script is run as root if [ "$(id -u)" -eq 0 ]; then - echo "Run me as a normal user, not root!" + echo "Run this script as a normal user, not root!" exit 1 fi +# Define variables installer_path="$HOME/.equilotl" github_url="https://github.com/Equicord/Equilotl/releases/latest/download/EquilotlCli-Linux" +# Inform user about the update check echo "Checking if the installer needs updating..." +# Fetch the latest modified date from the server +latest_modified=$(curl -sI "$github_url" | grep -i "last-modified" | cut -d' ' -f2-) -latest_modified=$(curl -sI "https://github.com/Equicord/Equilotl/releases/latest/download/EquilotlCli-Linux" | grep -i "last-modified" | cut -d' ' -f2-) - +# Check if the installer exists locally if [ -f "$installer_path" ]; then + # Get the local file's last modified date local_modified=$(stat -c "%y" "$installer_path" | cut -d' ' -f1-2) + # Compare the local file's date with the server's latest modified date if [ "$local_modified" = "$latest_modified" ]; then echo "The installer is up-to-date." else echo "The installer is outdated. Downloading the latest version..." - curl -sSL "https://github.com/Equicord/Equilotl/releases/latest/download/EquilotlCli-Linux" --output "$installer_path" + curl -sSL "$github_url" --output "$installer_path" chmod +x "$installer_path" fi else echo "Installer not found. Downloading it..." - curl -sSL "https://github.com/Equicord/Equilotl/releases/latest/download/EquilotlCli-Linux" --output "$installer_path" + curl -sSL "$github_url" --output "$installer_path" chmod +x "$installer_path" fi - +# Check for sudo or doas availability to run the installer with elevated privileges if command -v sudo >/dev/null; then echo "Running installer with sudo..." sudo "$installer_path" @@ -41,5 +49,7 @@ else echo "Neither sudo nor doas were found. Please install one to proceed." exit 1 fi + +# Provide script attribution echo "Original script forked from Vencord" echo "Modified by PhoenixAceVFX & Crxaw for Equicord Updater" From f82f02085a0ef425f81b1947b2bf583ff7cc4d20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=E2=82=ACth?= <143244075+wont-stream@users.noreply.github.com> Date: Wed, 11 Dec 2024 14:58:19 -0500 Subject: [PATCH 3/4] DisableAnimations: Plugin to disable most of Discord's animations (#111) * DisableAnimations: Plugin to disable most of Discord's animations * Fix GrammarFix author name * Add DisableAnimations to README * Update Count * Remove Extra Spacing --------- Co-authored-by: thororen1234 Co-authored-by: thororen <78185467+thororen1234@users.noreply.github.com> --- README.md | 5 +- .../disableAnimations/index.ts | 53 +++++++++++++++++++ 2 files changed, 56 insertions(+), 2 deletions(-) create mode 100644 src/equicordplugins/disableAnimations/index.ts diff --git a/README.md b/README.md index 8ed574d8..4f87a96c 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ You can join our [discord server](https://discord.gg/5Xh2W87egW) for commits, ch ### Extra included plugins
-150 additional plugins +151 additional plugins ### All Platforms - AllCallTimers by MaxHerbold & D3SOX @@ -44,6 +44,7 @@ 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 +67,7 @@ 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 unstream +- GrammarFix by S€th - HideChatButtons by iamme - HideMessage by Hanzy - HideServers by bepvte diff --git a/src/equicordplugins/disableAnimations/index.ts b/src/equicordplugins/disableAnimations/index.ts new file mode 100644 index 00000000..865e9cf0 --- /dev/null +++ b/src/equicordplugins/disableAnimations/index.ts @@ -0,0 +1,53 @@ +/* + * 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 . +*/ + +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(); + } +}); From fec51b3683180453b8b6cc346829486c0ea7ec4d Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Wed, 11 Dec 2024 23:52:51 -0500 Subject: [PATCH 4/4] Drop DeadMembers And MoreThemes TEMP --- README.md | 6 +-- src/equicordplugins/deadMembers/index.tsx | 62 ----------------------- src/equicordplugins/moreThemes/index.ts | 34 ------------- 3 files changed, 2 insertions(+), 100 deletions(-) delete mode 100644 src/equicordplugins/deadMembers/index.tsx delete mode 100644 src/equicordplugins/moreThemes/index.ts diff --git a/README.md b/README.md index 4f87a96c..2307ffbd 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ You can join our [discord server](https://discord.gg/5Xh2W87egW) for commits, ch ### Extra included plugins
-151 additional plugins +149 additional plugins ### All Platforms - AllCallTimers by MaxHerbold & D3SOX @@ -42,7 +42,6 @@ You can join our [discord server](https://discord.gg/5Xh2W87egW) for commits, ch - CuteNekos by echo - CutePats by thororen - DecodeBase64 by ThePirateStoner -- DeadMembers by Kyuuhachi - Demonstration by Samwich - DisableAnimations by S€th - DisableCameras by Joona @@ -97,7 +96,6 @@ You can join our [discord server](https://discord.gg/5Xh2W87egW) for commits, ch - MessageTranslate by Samwich - ModalFade by Kyuuhachi - MoreStickers by Leko & Arjix -- MoreThemes by Kyuuhachi - NewPluginsManager by Sqaaakoi - NoAppsAllowed by kvba - NoBulletPoints by Samwich @@ -191,7 +189,7 @@ Linux ```shell sh -c "$(curl -sS https://raw.githubusercontent.com/Equicord/Equicord/refs/heads/main/misc/install.sh)" ``` - + ## Installing Equicord Devbuild ### Dependencies diff --git a/src/equicordplugins/deadMembers/index.tsx b/src/equicordplugins/deadMembers/index.tsx deleted file mode 100644 index 1da633c8..00000000 --- a/src/equicordplugins/deadMembers/index.tsx +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Vencord, a Discord client mod - * Copyright (c) 2024 Vendicated and contributors - * SPDX-License-Identifier: GPL-3.0-or-later - */ - -import { Devs } from "@utils/constants"; -import definePlugin from "@utils/types"; -import { ChannelStore, GuildMemberStore, useStateFromStores } from "@webpack/common"; - -export default definePlugin({ - name: "DeadMembers", - description: "Shows when the sender of a message has left the guild", - authors: [Devs.Kyuuhachi], - - patches: [ - { - find: '.BADGES=1]="BADGES"', - replacement: { - match: /(\i)=\{className:\i.username,style:.*?onContextMenu:\i,children:.*?\},/, - replace: "$&__dummyvar=($1.children=$self.wrapMessageAuthor(arguments[0],$1.children))," - } - }, - { - find: "#{intl::FORUM_POST_AUTHOR_A11Y_LABEL}", - replacement: { - match: /(?<=\}=(\i),\{(user:\i,author:\i)\}=.{0,400}?\(\i\.Fragment,{children:)\i(?=}\),)/, - replace: "$self.wrapForumAuthor({...$1,$2},$&)" - } - }, - ], - - wrapMessageAuthor({ message }, text) { - const channel = ChannelStore.getChannel(message.channel_id); - return message.webhookId - ? text - : ; - }, - - wrapForumAuthor({ channel, user }, text) { - return !user - ? text - : ; - }, -}); - - -function DeadIndicator({ channel, userId, text }) { - const isMember = useStateFromStores( - [GuildMemberStore], - () => GuildMemberStore.isMember(channel?.guild_id, userId), - ); - return channel?.guild_id && !isMember ? {text} : text; -} diff --git a/src/equicordplugins/moreThemes/index.ts b/src/equicordplugins/moreThemes/index.ts deleted file mode 100644 index 9627dac4..00000000 --- a/src/equicordplugins/moreThemes/index.ts +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Vencord, a Discord client mod - * Copyright (c) 2024 Vendicated and contributors - * SPDX-License-Identifier: GPL-3.0-or-later - */ - -import { Devs } from "@utils/constants"; -import definePlugin from "@utils/types"; - -export default definePlugin({ - name: "MoreThemes", - description: "Enables Darker and Midnight themes", - authors: [Devs.Kyuuhachi], - - patches: [ - { - // matches twice: the settings menu and the settings context menu - find: '("appearance_settings")', - replacement: { - match: /\("appearance_settings"\)/, - replace: "$&||true" - }, - all: true, - }, - { - // make it actually save the setting instead of falling back to dark - find: 'getCurrentConfig({location:"ThemeStore"}).enabled', - replacement: { - match: /getCurrentConfig\(\{location:"ThemeStore"\}\)\.enabled/, - replace: "$&&&false" - }, - } - ], -});