diff --git a/README.md b/README.md index c9e51a71..6e3eb003 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
-147 additional plugins +146 additional plugins ### All Platforms - AllCallTimers by MaxHerbold & D3SOX @@ -90,7 +90,6 @@ You can join our [discord server](https://discord.gg/5Xh2W87egW) for commits, ch - MessageLoggerEnhanced by Aria - MessagePeek by HypedDomi - MessageTranslate by Samwich -- ModalFade by Kyuuhachi - MoreStickers by Leko & Arjix - NeverPausePreviews by vappstar - NewPluginsManager by Sqaaakoi diff --git a/src/equicordplugins/betterInvites/index.tsx b/src/equicordplugins/betterInvites/index.tsx index c26e21ba..a2c650ba 100644 --- a/src/equicordplugins/betterInvites/index.tsx +++ b/src/equicordplugins/betterInvites/index.tsx @@ -40,7 +40,7 @@ export default definePlugin({ find: "#{intl::HUB_INVITE_ANOTHER_SCHOOL_LINK}", replacement: [ { - match: /,(\i)&&(\(.{0,15}\i\.TooltipContainer.+)(\i\.\i\.string\(\i\.\i#{intl::GUEST_MEMBERSHIP_EXPLANATION}\))/, + match: /,(\i)&&(\(.{0,50}\i\.tooltipContainer.+)(\i\.\i\.string\(\i\.\i#{intl::GUEST_MEMBERSHIP_EXPLANATION}\))/, replace: ",($1||((!$1)&&arguments[0].invite.expires_at)) && $2$self.RenderTip($1, $3, arguments[0].invite.expires_at)" }, { diff --git a/src/equicordplugins/blockKrisp/index.ts b/src/equicordplugins/blockKrisp/index.ts index 63daeef8..28f6791e 100644 --- a/src/equicordplugins/blockKrisp/index.ts +++ b/src/equicordplugins/blockKrisp/index.ts @@ -24,8 +24,8 @@ export default definePlugin({ { find: "krisp_browser_models", replacement: { - match: /\i:function\(\)\{/, - replace: "$&return null;" + match: /(\i,\{\i:\(\)=>)\i/, + replace: "$1null" } }, // Set Krisp to not supported diff --git a/src/equicordplugins/keywordNotify/index.tsx b/src/equicordplugins/keywordNotify/index.tsx index 621755b0..920c08b2 100644 --- a/src/equicordplugins/keywordNotify/index.tsx +++ b/src/equicordplugins/keywordNotify/index.tsx @@ -313,9 +313,9 @@ export default definePlugin({ settings, patches: [ { - find: "#{intl::UNREADS_TAB_LABEL}", + find: "#{intl::UNREADS_TAB_LABEL})}", replacement: { - match: /\i\?\(0,\i\.jsxs\)\(\i\.TabBar\.Item/, + match: /\(0,\i\.jsxs\)\(\i\.\i\i\.Item/, replace: "$self.keywordTabBar(),$&" } }, diff --git a/src/equicordplugins/messageLinkTooltip/index.tsx b/src/equicordplugins/messageLinkTooltip/index.tsx index f74ec77b..33fdbae0 100644 --- a/src/equicordplugins/messageLinkTooltip/index.tsx +++ b/src/equicordplugins/messageLinkTooltip/index.tsx @@ -104,7 +104,7 @@ export default definePlugin({ find: "#{intl::REPLY_QUOTE_MESSAGE_NOT_LOADED}", replacement: { // Should match two places - match: /(\i\.Clickable),\{/g, + match: /(\i\.clickable),\{/g, replace: "$self.ReplyTooltip,{Component:$1,vcProps:arguments[0]," }, predicate: () => settings.store.onReply, @@ -112,8 +112,8 @@ export default definePlugin({ { find: "#{intl::MESSAGE_FORWARDED}", replacement: { - match: /(\i\.Clickable),\{/, - replace: "$self.ForwardTooltip,{Component:$1,vcProps:arguments[0]," + match: /(null:.{0,20})(\i\.\i\i),\{/, + replace: "$1$self.ForwardTooltip,{Component:$2,vcProps:arguments[0]," }, predicate: () => settings.store.onForward, }, diff --git a/src/equicordplugins/modalFade/index.tsx b/src/equicordplugins/modalFade/index.tsx deleted file mode 100644 index 3171f15e..00000000 --- a/src/equicordplugins/modalFade/index.tsx +++ /dev/null @@ -1,103 +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 { proxyLazy } from "@utils/lazy"; -import definePlugin from "@utils/types"; -import { findByPropsLazy } from "@webpack"; -import { Forms, useEffect, useRef } from "@webpack/common"; -import type { StoreApi, UseBoundStore } from "zustand"; - -type Modal = { - Layer?: any, - instant?: boolean, - backdropStyle?: "SUBTLE" | "DARK" | "BLUR", "IMMERSIVE", -}; - -const { useModalContext, useModalsStore } = proxyLazy(() => Forms as any as { - useModalContext(): "default" | "popout"; - useModalsStore: UseBoundStore>, -}); - -const { animated, useSpring, useTransition } = findByPropsLazy("a", "animated", "useTransition"); - -const ANIMS = { - SUBTLE: { - off: { opacity: 1 }, - on: { opacity: 0.9 }, - }, - DARK: { - off: { opacity: 1 }, - on: { opacity: 0.7 }, - }, - BLUR: { - off: { opacity: 1, filter: "blur(0px)" }, - on: { opacity: 0.7, filter: "blur(8px)" }, - }, - IMMERSIVE: { - off: { opacity: 1 }, - on: { opacity: 0.7 } - } -}; - -export default definePlugin({ - name: "ModalFade", - description: "Makes modals fade the backdrop, rather than dimming", - authors: [Devs.Kyuuhachi], - - patches: [ - { - find: "contextMenuCallbackNative,!1", - replacement: { - match: /(?<=\()"div"(?=,\{className:\i\(\)\(\i\?\i\.mobileApp:\i.app\))/, - replace: "$self.MainWrapper", - } - }, - { - find: ".SUBTLE=\"SUBTLE\"", - replacement: { - match: /\(0,\i\.useTransition\)*/, - replace: "$self.nullTransition" - } - } - ], - - nullTransition(value: any, args: object) { - return useTransition(value, { - ...args, - from: {}, - enter: { _: 0 }, // Spring gets unhappy if there's zero animations - leave: {}, - }); - }, - - MainWrapper(props: object) { - const context = useModalContext(); - const modals = useModalsStore(modals => modals[context] ?? []); - const modal = modals.findLast(modal => modal.Layer == null); // || modal.Layer === AppLayer - const anim = ANIMS[modal?.backdropStyle ?? "DARK"]; - const isInstant = modal?.instant; - const prevIsInstant = usePrevious(isInstant); - const style = useSpring({ - config: { duration: isInstant || prevIsInstant ? 0 : 300 }, - ...modal != null ? anim.on : anim.off, - }); - return ; - } -}); - -function usePrevious(value: T | undefined): T | undefined { - const ref = useRef(undefined); - useEffect(() => { - if (ref !== undefined) { - ref.current = value; - } - }, [value]); - return ref.current; -} diff --git a/src/equicordplugins/statusPresets/index.tsx b/src/equicordplugins/statusPresets/index.tsx index 9c1fe320..a2dfe752 100644 --- a/src/equicordplugins/statusPresets/index.tsx +++ b/src/equicordplugins/statusPresets/index.tsx @@ -171,7 +171,7 @@ export default definePlugin({ { find: "#{intl::CUSTOM_STATUS_SET_CUSTOM_STATUS}", replacement: { - match: /\.ModalFooter,.{0,70}\i\.\i\.string\(\i\.\i#{intl::SAVE}\)\}\)/, + match: /\.\i\i,children:.{0,70}\i\.\i\.string\(\i\.\i#{intl::SAVE}\)\}\)/, replace: "$&,$self.renderRememberButton(this.state)" } }, diff --git a/src/plugins/noBlockedMessages/index.ts b/src/plugins/noBlockedMessages/index.ts index ca17f8ef..97f7c9bf 100644 --- a/src/plugins/noBlockedMessages/index.ts +++ b/src/plugins/noBlockedMessages/index.ts @@ -88,7 +88,7 @@ export default definePlugin({ find: "referencedUsernameProfile,referencedAvatarProfile", replacement: [ { - match: /CUSTOM_GIFT.*?=(?=\(0,\i.jsx\)\(\i.FocusRing)/, + match: /CUSTOM_GIFT.*?=(?=\(0,\i.jsx\)\(\i.\i\i)/, replace: "$&!$self.isReplyToBlocked(arguments[0].message)&&", } ], diff --git a/src/plugins/showHiddenChannels/index.tsx b/src/plugins/showHiddenChannels/index.tsx index 92526c4a..a23acc53 100644 --- a/src/plugins/showHiddenChannels/index.tsx +++ b/src/plugins/showHiddenChannels/index.tsx @@ -212,8 +212,8 @@ export default definePlugin({ { // Make muted channels also appear as unread if hide unreads is false and the channel is hidden predicate: () => settings.store.channelStyle === ChannelStyle.MutedUnread || settings.store.channelStyle === ChannelStyle.Unread, - match: /\.LOCKED;if\((?<={channel:(\i).+?)/, - replace: (m, channel) => `${m}!$self.isHiddenChannel(${channel})&&` + match: /(?<=\.LOCKED(?:;if\(|:))(?<={channel:(\i).+?)/, + replace: (_, channel) => `!$self.isHiddenChannel(${channel})&&` } ] },