diff --git a/README.md b/README.md index 75b5e1e65..fb4e10716 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ An enhanced version of [Vencord](https://github.com/Vendicated/Vencord) by [Vend - Request for plugins from Discord.
-Extra included plugins (64 additional plugins) +Extra included plugins (62 additional plugins) - AllCallTimers by MaxHerbold and D3SOX - AltKrispSwitch by newwares @@ -29,7 +29,6 @@ An enhanced version of [Vencord](https://github.com/Vendicated/Vencord) by [Vend - BetterActivities by D3SOX, Arjix, AutumnVN - BetterQuests by kvba - BetterQuickReact by Ven and Sqaaakoi -- BetterShopPreview by Tolgchu - BlockKrsip by D3SOX - BypassDND by Inbestigator - CleanChannelName by AutumnVN @@ -78,7 +77,6 @@ An enhanced version of [Vencord](https://github.com/Vendicated/Vencord) by [Vend - SoundBoardLogger by Moxxie, fres, echo, thororen - TalkInReverse by Tolgchu - ThemeLibrary by Fafa -- Title by Kyuuhachi - UnlimitedAccounts by Balaclava and thororen - UserPFP by nexpid and thororen - VCSupport by thororen diff --git a/src/equicordplugins/betterActivities/index.tsx b/src/equicordplugins/betterActivities/index.tsx index d7ad0270a..029b179d4 100644 --- a/src/equicordplugins/betterActivities/index.tsx +++ b/src/equicordplugins/betterActivities/index.tsx @@ -246,9 +246,9 @@ export default definePlugin({ patches: [ { // Patch activity icons - find: "default.getHangStatusActivity():null!", + find: ".getHangStatusActivity():null!", replacement: { - match: /null!=(\i)&&\i.some\(\i=>\(0,\i.default\)\(\i,\i\)\)\?/, + match: /null!=(\i)&&\i.some\(\i=>\(0,\i.\i\)\(\i,\i\)\)\?/, replace: "$self.patchActivityList(e),false?" }, predicate: () => settings.store.memberList, diff --git a/src/equicordplugins/betterQuickReact/index.tsx b/src/equicordplugins/betterQuickReact/index.tsx index f1532670e..c3186ec45 100644 --- a/src/equicordplugins/betterQuickReact/index.tsx +++ b/src/equicordplugins/betterQuickReact/index.tsx @@ -58,35 +58,33 @@ export default definePlugin({ replace: "($self.settings.store.frequentEmojis?[]:$1).concat" } }, - // Override limit of emojis to display { - find: "default.Messages.ADD_REACTION_NAMED.format", - replacement: { - match: /(\i)\.length>4&&\((\i)\.length=4\);/, - replace: "let [betterQuickReactScrollValue,setBetterQuickReactScrollValue]=Vencord.Webpack.Common.React.useState(0);betterQuickReactScrollValue;" - } - }, - // Add a custom class to identify the quick reactions have been modified and a CSS variable for the number of columns to display - { - find: "default.Messages.ADD_REACTION_NAMED.format", - replacement: { - match: /className:(\i)\.wrapper,/, - replace: "className:\"vc-better-quick-react \"+($self.settings.store.compactMode?\"vc-better-quick-react-compact \":\"\")+$1.wrapper,style:{\"--vc-better-quick-react-columns\":$self.settings.store.columns}," - } - }, - { - find: "default.Messages.ADD_REACTION_NAMED.format", - replacement: { - match: /children:(\i)\.map\(/, - replace: "onWheel:$self.onWheelWrapper(betterQuickReactScrollValue,setBetterQuickReactScrollValue,$1.length),children:$self.applyScroll($1,betterQuickReactScrollValue).map(" - } + find: ".ADD_REACTION_NAMED.format", + group: true, + replacement: [ + // Override limit of emojis to display with offset hook. + { + match: /(\i)\.length>4&&\((\i)\.length=4\);/, + replace: "let [betterQuickReactScrollValue,setBetterQuickReactScrollValue]=Vencord.Webpack.Common.React.useState(0);betterQuickReactScrollValue;" + }, + // Add a custom class to identify the quick reactions have been modified and a CSS variable for the number of columns to display + { + match: /className:(\i)\.wrapper,/, + replace: "className:\"vc-better-quick-react \"+($self.settings.store.compactMode?\"vc-better-quick-react-compact \":\"\")+$1.wrapper,style:{\"--vc-better-quick-react-columns\":$self.settings.store.columns}," + }, + // Scroll handler + Apply the emoji count limit from earlier with custom logic + { + match: /children:(\i)\.map\(/, + replace: "onWheel:$self.onWheelWrapper(betterQuickReactScrollValue,setBetterQuickReactScrollValue,$1.length),children:$self.applyScroll($1,betterQuickReactScrollValue).map(" + } + ] }, // MenuGroup doesn't accept styles or anything special by default :/ { - find: "{MenuGroup:function()", + find: ".groupLabel,", replacement: { match: /role:"group",/, - replace: "role:\"group\",style:arguments[0].style,onWheel:arguments[0].onWheel," + replace: "$&style:arguments[0].style,onWheel:arguments[0].onWheel," } } ], diff --git a/src/equicordplugins/betterShopPreview/index.tsx b/src/equicordplugins/betterShopPreview/index.tsx deleted file mode 100644 index b61d26332..000000000 --- a/src/equicordplugins/betterShopPreview/index.tsx +++ /dev/null @@ -1,88 +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 . -*/ - -import { definePluginSettings } from "@api/Settings"; -import { EquicordDevs } from "@utils/constants"; -import definePlugin, { OptionType } from "@utils/types"; -import { UserStore, useState } from "@webpack/common"; - -let avatarUrl = ""; - -const settings = definePluginSettings({ - default: { - type: OptionType.BOOLEAN, - description: "Enable avatar preview by default.", - default: true - } -}); - -function toggle(enabled: boolean) { - const avatars = document.querySelectorAll(".shopCard__3d319 .avatarContainer_e11d35 .wrapper__3ed10 .mask_d5067d foreignObject .avatarStack__789b4"); - - for (const avatar of avatars) { - const img = avatar.querySelector("img"); - - if (img) img.src = enabled ? avatarUrl : "https://canary.discord.com/assets/6d8f0708e196aaad2550.png"; - } -} - -const PreviewToggle = () => { - const [enabled, setEnabled] = useState(settings.store.default); - - toggle(enabled); - - return ( - - ); -}; - -export default definePlugin({ - name: "Better Shop Preview", - description: "Uses your avatar for avatar decoration previews in the Discord Shop (without hovering).", - authors: [EquicordDevs.Tolgchu], - settings, - patches: [ - { - find: ".Messages.COLLECTIBLES_SHOP})]}", - replacement: [{ - match: /(children:\i.default.Messages.COLLECTIBLES_SHOP)}/, - replace: "$&,$self.PreviewToggle()" - }] - } - ], - PreviewToggle, - async start() { - const user = UserStore.getCurrentUser(); - const url = `https://cdn.discordapp.com/avatars/${user.id}/${user.avatar}.gif`; - - await fetch(url).then(response => { - if (response.ok) avatarUrl = url; - else avatarUrl = url.replace(".gif", ".png"); - }); - }, - stop() { } -}); diff --git a/src/equicordplugins/blockKrisp/index.ts b/src/equicordplugins/blockKrisp/index.ts index 645a4509e..a0c5cf281 100644 --- a/src/equicordplugins/blockKrisp/index.ts +++ b/src/equicordplugins/blockKrisp/index.ts @@ -16,7 +16,7 @@ export default definePlugin({ { find: "Failed to load Krisp module", replacement: { - match: /await (\i).default.ensureModule\("discord_krisp"\)/, + match: /await \i.\i.ensureModule\("discord_krisp"\)/, replace: "throw new Error();$&" } }, @@ -24,7 +24,7 @@ export default definePlugin({ { find: "krisp_browser_models", replacement: { - match: /getKrispSDK:function\(\)\{/, + match: /\i:function\(\)\{/, replace: "$&return null;" } }, diff --git a/src/equicordplugins/keywordNotify/index.tsx b/src/equicordplugins/keywordNotify/index.tsx index 39413b1e1..2f7a237ca 100644 --- a/src/equicordplugins/keywordNotify/index.tsx +++ b/src/equicordplugins/keywordNotify/index.tsx @@ -23,7 +23,7 @@ let currentUser: User; let keywordLog: Array = []; const MenuHeader = findByCodeLazy(".useInDesktopNotificationCenterExperiment)()?"); -const Popout = findByPropsLazy("ItemsPopout"); +const Popout = findByCodeLazy("let{analyticsName:"); const recentMentionsPopoutClass = findByPropsLazy("recentMentionsPopout"); const KEYWORD_ENTRIES_KEY = "KeywordNotify_keywordEntries"; const KEYWORD_LOG_KEY = "KeywordNotify_log"; @@ -92,7 +92,7 @@ function Collapsible({ title, children }) { size={Button.Sizes.ICON} className="keywordnotify-collapsible">
-
{isOpen ? "▲" : "▼"}
+
{isOpen ? "▼" : "▶"}
{title}
@@ -393,6 +393,7 @@ export default definePlugin({ }; const messageRender = (e, t) => { + console.log(this); const msg = this.renderMsg({ message: e, gotoMessage: t, @@ -410,9 +411,15 @@ export default definePlugin({ return [msg]; }; + /* return ( + <> +

hi uwu

+ + );*/ + return ( <> - header} renderMessage={messageRender} diff --git a/src/equicordplugins/noModalAnimation/index.ts b/src/equicordplugins/noModalAnimation/index.ts index abaead283..0d0478b96 100644 --- a/src/equicordplugins/noModalAnimation/index.ts +++ b/src/equicordplugins/noModalAnimation/index.ts @@ -20,7 +20,7 @@ export default definePlugin({ } }, { - find: "{BackdropStyles:function(){", + find: 'backdropFilter:"blur(0px)"', replacement: { match: /\?0:300/, replace: "?0:0", diff --git a/src/equicordplugins/title/index.ts b/src/equicordplugins/title/index.ts deleted file mode 100644 index 2e6289318..000000000 --- a/src/equicordplugins/title/index.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Vencord, a Discord client mod - * Copyright (c) 2024 Vendicated and contributors - * SPDX-License-Identifier: GPL-3.0-or-later - */ - -import { definePluginSettings } from "@api/Settings"; -import { Devs } from "@utils/constants"; -import definePlugin, { OptionType } from "@utils/types"; -import { findByPropsLazy } from "@webpack"; - -const TitleManager = findByPropsLazy("setPageTitleNotificationCount", "flashPageTitle"); -const rootTitle = { base: null as string | null }; - -export const settings = definePluginSettings({ - title: { - type: OptionType.STRING, - default: "Vencord", - description: "Window title prefix", - onChange: setTitle, - }, -}); - -function setTitle(v: string) { - rootTitle.base = v || null; - TitleManager.flashPageTitle({ messages: 0 })(); -} - -export default definePlugin({ - name: "Title", - description: "Replaces the window title prefix", - authors: [Devs.Kyuuhachi], - settings, - - patches: [ - { - find: "setPageTitleNotificationCount:function()", - replacement: { - match: /(?<==)(?={base:)/, - replace: "$self.rootTitle??", - }, - }, - ], - - start() { - setTitle(settings.store.title); - }, - - rootTitle, -}); diff --git a/src/equicordplugins/userpfp/index.tsx b/src/equicordplugins/userpfp/index.tsx index f741db99d..83efe47c4 100644 --- a/src/equicordplugins/userpfp/index.tsx +++ b/src/equicordplugins/userpfp/index.tsx @@ -56,10 +56,6 @@ export default definePlugin({ { match: /(getUserAvatarURL:)(\i),/, replace: "$1$self.getAvatarHook($2)," - }, - { - match: /(getUserAvatarURL:\i\(\){return )(\i)}/, - replace: "$1$self.getAvatarHook($2)}" } ] }