From 76746c0c4a450f7aca2e7d18be0e91c4843f50b9 Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Fri, 21 Jun 2024 20:05:37 -0400 Subject: [PATCH] Fixes --- README.md | 4 +- src/equicordplugins/altKrispSwitch/index.tsx | 2 +- src/equicordplugins/annamox/index.ts | 10 +- .../betterActivities/index.tsx | 2 +- src/equicordplugins/betterQuests/index.tsx | 23 +-- src/equicordplugins/colorMessage/index.ts | 62 ------ src/equicordplugins/colorMessage/style.css | 12 -- src/equicordplugins/exportContacts/index.tsx | 4 +- src/equicordplugins/keywordNotify/index.tsx | 78 +++---- .../messageLinkTooltip/index.tsx | 4 +- .../serverProfilesToolBox/index.tsx | 190 ----------------- .../components/CloneSoundModal.tsx | 193 ------------------ .../components/SoundBoardLog.tsx | 12 +- src/equicordplugins/soundBoardLogger/utils.ts | 7 +- src/equicordplugins/whosWatching/index.tsx | 11 +- .../youtubeDescription/index.tsx | 2 +- src/plugins/mutualGroupDMs/index.tsx | 6 +- 17 files changed, 74 insertions(+), 548 deletions(-) delete mode 100644 src/equicordplugins/colorMessage/index.ts delete mode 100644 src/equicordplugins/colorMessage/style.css delete mode 100644 src/equicordplugins/serverProfilesToolBox/index.tsx delete mode 100644 src/equicordplugins/soundBoardLogger/components/CloneSoundModal.tsx diff --git a/README.md b/README.md index 24cac7a5..caf07ef3 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 (61 additional plugins) +Extra included plugins (59 additional plugins) - AllCallTimers by MaxHerbold and D3SOX - AltKrispSwitch by newwares @@ -32,7 +32,6 @@ An enhanced version of [Vencord](https://github.com/Vendicated/Vencord) by [Vend - BlockKrsip by D3SOX - BypassDND by Inbestigator - CleanChannelName by AutumnVN -- ColorMessage by Kyuuhachi - CopyUserMention by Cortex and castdrian - CustomAppIcons by Happy Enderman and SerStars - DNDWhilePlaying by thororen @@ -70,7 +69,6 @@ An enhanced version of [Vencord](https://github.com/Vendicated/Vencord) by [Vend - Search by JacobTm and thororen - SearchFix by Jaxx - Sekai Stickers by MaiKokain -- ServerProfilesToolbox by D3SOX - ShowBadgesInChat by Inbestigator and KrystalSkull - Slap by Korbo - SoundBoardLogger by Moxxie, fres, echo, thororen diff --git a/src/equicordplugins/altKrispSwitch/index.tsx b/src/equicordplugins/altKrispSwitch/index.tsx index 47a71343..4d674dd6 100644 --- a/src/equicordplugins/altKrispSwitch/index.tsx +++ b/src/equicordplugins/altKrispSwitch/index.tsx @@ -15,7 +15,7 @@ export default definePlugin({ { find: ",setNoiseCancellation(", replacement: { - match: /(}\),)(.{1,2}\.default\.dispatch\({type:"AUDIO_SET_NOISE_SUPPRESSION",)/, + match: /(}\),)(.{1,2}\.\i\.dispatch\({type:"AUDIO_SET_NOISE_SUPPRESSION",)/, replace: "$1!$self.shouldCancelSuppression(arguments)&&$2" } } diff --git a/src/equicordplugins/annamox/index.ts b/src/equicordplugins/annamox/index.ts index d26bce5c..b770278a 100644 --- a/src/equicordplugins/annamox/index.ts +++ b/src/equicordplugins/annamox/index.ts @@ -57,14 +57,14 @@ export default definePlugin({ predicate: () => settings.store.dms, }, { // Above DMs, keyboard nav - find: ".default.hasLibraryApplication()&&!", + find: ".hasLibraryApplication()&&!", replacement: [ { - match: /\i\.Routes\.APPLICATION_STORE,/, + match: /\i\.\i\.APPLICATION_STORE,/, replace: "/*$&*/", }, { - match: /\i\.Routes\.COLLECTIBLES_SHOP,/, + match: /\i\.\i\.COLLECTIBLES_SHOP,/, replace: "/*$&*/", }, ], @@ -87,9 +87,9 @@ export default definePlugin({ predicate: () => settings.store.gift, }, { // Emoji list - find: "useEmojiGrid:function()", + find: /\i\.\i\i\.getEmojiUnavailableReason/, replacement: { - match: /(\w+)=!\w+&&\w+.default.isEmojiCategoryNitroLocked\(\{[^}]*\}\);/, + match: /(\w+)=!\w+&&\w+.\i.isEmojiCategoryNitroLocked\(\{[^}]*\}\);/, replace: "$&$1||" }, predicate: () => settings.store.emojiList, diff --git a/src/equicordplugins/betterActivities/index.tsx b/src/equicordplugins/betterActivities/index.tsx index 029b179d..84d98516 100644 --- a/src/equicordplugins/betterActivities/index.tsx +++ b/src/equicordplugins/betterActivities/index.tsx @@ -255,7 +255,7 @@ export default definePlugin({ }, { // Show all activities in the profile panel - find: /.UserProfileTypes.PANEL,themeOverride:\i\i/, + find: /\i\.\i\i\.PANEL,themeOverride:\i\i,/, replacement: { match: /(?<=\(0,\i\.jsx\)\()\i\.\i(?=,{activity:.+?,user:\i,channelId:\i.id,)/, replace: "$self.showAllActivitiesComponent" diff --git a/src/equicordplugins/betterQuests/index.tsx b/src/equicordplugins/betterQuests/index.tsx index 021a8f38..3d9c6f9d 100644 --- a/src/equicordplugins/betterQuests/index.tsx +++ b/src/equicordplugins/betterQuests/index.tsx @@ -9,8 +9,8 @@ import "./style.css"; import ErrorBoundary from "@components/ErrorBoundary"; import { EquicordDevs } from "@utils/constants"; import definePlugin from "@utils/types"; -import { extractAndLoadChunksLazy, findByPropsLazy, findComponentByCodeLazy, findExportedComponentLazy, findStoreLazy } from "@webpack"; -import { useEffect, useState } from "@webpack/common"; +import { extractAndLoadChunksLazy, findComponentByCodeLazy, findExportedComponentLazy, findStoreLazy } from "@webpack"; +import { NavigationRouter, useEffect, useState } from "@webpack/common"; const LinkButton = findExportedComponentLazy("LinkButton"); // let {route: e, selected: t, icon: n, iconClassName: a, interactiveClassName: s, text: r, children: o, locationState: d, onClick: f, className: p, role: m, "aria-posinset": C, "aria-setsize": g, ...E} = this.props; @@ -20,7 +20,6 @@ const QuestsComponent = findComponentByCodeLazy(".questsContainer"); // No nesse const questsStore = findStoreLazy("QuestsStore"); const requireSettingsMenu = extractAndLoadChunksLazy(['name:"UserSettings"'], /createPromise:.{0,20}Promise\.all\((\[\i\.\i\(".+?"\).+?\])\).then\(\i\.bind\(\i,"(.+?)"\)\).{0,50}"UserSettings"/); -const nav: NavigationSettings = findByPropsLazy("transitionTo", "transitionToGuild", "getHistory"); // Routes used in this plugin (in case someone wants to add new ones) @@ -82,14 +81,10 @@ const QuestButtonComponent = () => { const redirectRoute = (ev: BeforeUnloadEvent) => { const paths = Array.from(routes.keys()); - const path = nav.getHistory().location.pathname; - if (paths.includes(path)) { - const data = routes.get(path); - ev.preventDefault(); - nav.transitionTo(data?.redirectTo ?? "/channels/@me"); - setTimeout(() => window.location.reload(), 0); - } + ev.preventDefault(); + NavigationRouter.transitionTo("/quests/@me"); + setTimeout(() => window.location.reload(), 0); }; export default definePlugin({ @@ -110,23 +105,23 @@ export default definePlugin({ patches: [ { // Add new quest button - find: "\"discord-shop\"", + find: "\"discord-shop\"),", replacement: { match: /"discord-shop"\),/, replace: "$&,$self.QuestButtonComponent()," } }, { // Add new route - find: "Routes.MESSAGE_REQUESTS,render:", + find: ".MESSAGE_REQUESTS,render:", replacement: { - match: /\((0,.{0,10}\.jsx\)\(.{0,10}\.default,){path:.{0,10}\.Routes\.MESSAGE_REQUESTS,.{0,100}?\),/, + match: /\((0,.{0,10}\.jsx\)\(.{0,10}\.\i,){path:.{0,10}\.\i\.MESSAGE_REQUESTS,.{0,100}?\),/, replace: "$&...$self.routes.map(r => (($1r)))," } }, { find: 'on("LAUNCH_APPLICATION"', replacement: { - match: /path:\[.{0,500}Routes\.MESSAGE_REQUESTS,/, + match: /path:\[.{0,500}\i\.MESSAGE_REQUESTS,/, replace: "$&...$self.paths," } } diff --git a/src/equicordplugins/colorMessage/index.ts b/src/equicordplugins/colorMessage/index.ts deleted file mode 100644 index b354c7b8..00000000 --- a/src/equicordplugins/colorMessage/index.ts +++ /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 { definePluginSettings } from "@api/Settings"; -import * as Styles from "@api/Styles"; -import { makeRange } from "@components/PluginSettings/components"; -import { Devs } from "@utils/constants"; -import definePlugin, { OptionType } from "@utils/types"; -import { findByPropsLazy } from "@webpack"; - -const AuthorStore = findByPropsLazy("useNullableMessageAuthor", "useNullableMessageAuthor"); - -import style from "./style.css?managed"; - -export const settings = definePluginSettings({ - saturation: { - type: OptionType.SLIDER, - description: "Message color saturation", - markers: makeRange(0, 100, 10), - default: 20, - onChange() { - updateStyle(); - }, - }, -}); - -function updateStyle() { - (Styles.requireStyle(style).dom!.sheet!.cssRules[0] as CSSStyleRule) - .style.setProperty("--98-message-color-saturation", `${settings.store.saturation}`); -} - -export default definePlugin({ - name: "ColorMessage", - description: "Colors message content with author's role color", - authors: [Devs.Kyuuhachi], - settings, - - patches: [ - { - find: 'default.Messages.MESSAGE_EDITED,")"', - replacement: { - match: /id:\(0,\w+.getMessageContentId\)\((\w+)\),/, - replace: '$&style:{"--98-message-color":$self.getMessageColor($1)},' - } - }, - ], - - getMessageColor(messageId: string) { - return AuthorStore.default(messageId).colorString; - }, - - start() { - Styles.enableStyle(style); - updateStyle(); - }, - stop() { - Styles.disableStyle(style); - }, -}); diff --git a/src/equicordplugins/colorMessage/style.css b/src/equicordplugins/colorMessage/style.css deleted file mode 100644 index 440e609c..00000000 --- a/src/equicordplugins/colorMessage/style.css +++ /dev/null @@ -1,12 +0,0 @@ -/* stylelint-disable custom-property-pattern */ -:root { - --98-message-color-saturation: /*DYNAMIC*/; -} - -div[class*="messageContent_"] { - color: color-mix( - in lab, - var(--98-message-color, var(--text-normal)) calc(var(--98-message-color-saturation) * 1%), - var(--text-normal) - ) -} diff --git a/src/equicordplugins/exportContacts/index.tsx b/src/equicordplugins/exportContacts/index.tsx index 8cbe2bb2..797a3616 100644 --- a/src/equicordplugins/exportContacts/index.tsx +++ b/src/equicordplugins/exportContacts/index.tsx @@ -62,8 +62,8 @@ export default definePlugin({ { find: "fetchRelationships(){", replacement: { - match: /\.then\(e=>o\.default\.dispatch\({type:"LOAD_RELATIONSHIPS_SUCCESS",relationships:e\.body}\)/, - replace: ".then(e=>{o.default.dispatch({type:\"LOAD_RELATIONSHIPS_SUCCESS\",relationships:e.body}); $self.getContacts(e.body)}" + match: /\.then\(\i=>\i\.\i\.dispatch\({type:"LOAD_RELATIONSHIPS_SUCCESS",relationships:(\i\.body)}\);/, + replace: "$&$self.getContacts($2)}" } }, { diff --git a/src/equicordplugins/keywordNotify/index.tsx b/src/equicordplugins/keywordNotify/index.tsx index e2bed51a..6a9f4a34 100644 --- a/src/equicordplugins/keywordNotify/index.tsx +++ b/src/equicordplugins/keywordNotify/index.tsx @@ -8,6 +8,7 @@ import "./style.css"; import { DataStore } from "@api/index"; import { definePluginSettings } from "@api/Settings"; +import { classNameFactory } from "@api/Styles"; import { Flex } from "@components/Flex"; import { DeleteIcon } from "@components/Icons"; import { EquicordDevs } from "@utils/constants"; @@ -15,31 +16,32 @@ import { Margins } from "@utils/margins"; import { useForceUpdater } from "@utils/react"; import definePlugin, { OptionType } from "@utils/types"; import { findByCodeLazy, findByPropsLazy } from "@webpack"; -import { Button, ChannelStore, Forms, SearchableSelect, SelectedChannelStore, TabBar, TextInput, UserStore, UserUtils, useState } from "@webpack/common"; +import { Button, ChannelStore, Forms, SearchableSelect, SelectedChannelStore, TabBar, TextInput, UserStore, useState } from "@webpack/common"; import { Message, User } from "discord-types/general/index.js"; let keywordEntries: Array<{ regex: string, listIds: Array, listType: ListType; }> = []; let currentUser: User; let keywordLog: Array = []; -const MenuHeader = findByCodeLazy(".useInDesktopNotificationCenterExperiment)()?"); -const Popout = findByCodeLazy("let{analyticsName:"); +const MenuHeader = findByCodeLazy(".sv)()?(0,"); +const Popout = findByCodeLazy(".loadingMore&&null=="); const recentMentionsPopoutClass = findByPropsLazy("recentMentionsPopout"); +const createMessageRecord = findByCodeLazy("THREAD_CREATED?[]:(0,"); const KEYWORD_ENTRIES_KEY = "KeywordNotify_keywordEntries"; const KEYWORD_LOG_KEY = "KeywordNotify_log"; -const { createMessageRecord } = findByPropsLazy("createMessageRecord", "updateMessageRecord"); +const cl = classNameFactory("vc-keywordnotify-"); -async function addKeywordEntry(updater: () => void) { +async function addKeywordEntry(forceUpdate: () => void) { keywordEntries.push({ regex: "", listIds: [], listType: ListType.BlackList }); await DataStore.set(KEYWORD_ENTRIES_KEY, keywordEntries); - updater(); + forceUpdate(); } -async function removeKeywordEntry(idx: number, updater: () => void) { +async function removeKeywordEntry(idx: number, forceUpdate: () => void) { keywordEntries.splice(idx, 1); await DataStore.set(KEYWORD_ENTRIES_KEY, keywordEntries); - updater(); + forceUpdate(); } function safeMatchesRegex(s: string, r: string) { @@ -50,7 +52,6 @@ function safeMatchesRegex(s: string, r: string) { } } - enum ListType { BlackList = "BlackList", Whitelist = "Whitelist" @@ -90,7 +91,7 @@ function Collapsible({ title, children }) { onClick={() => setIsOpen(!isOpen)} look={Button.Looks.BLANK} size={Button.Sizes.ICON} - className="keywordnotify-collapsible"> + className={cl("collapsible")}>
{isOpen ? "▼" : "▶"}
{title} @@ -130,7 +131,7 @@ function ListedIds({ listIds, setListIds }) { }} look={Button.Looks.BLANK} size={Button.Sizes.ICON} - className="keywordnotify-delete"> + className={cl("delete")}> @@ -200,18 +201,18 @@ function KeywordEntries() { onClick={() => removeKeywordEntry(i, update)} look={Button.Looks.BLANK} size={Button.Sizes.ICON} - className="keywordnotify-delete"> + className={cl("delete")}> - + Whitelist/Blacklist
setListIds(i, e)} />
-
+
- - -
-
- - -
-
- ; - }, - - patches: [ - { - find: ".PROFILE_CUSTOMIZATION_GUILD_SELECT_TITLE", - replacement: { - match: /return\(0(.{10,350})\}\)\}\)\}/, - replace: "return [(0$1})}),$self.patchServerProfiles(e)]}" - } - } - ], - -}); diff --git a/src/equicordplugins/soundBoardLogger/components/CloneSoundModal.tsx b/src/equicordplugins/soundBoardLogger/components/CloneSoundModal.tsx deleted file mode 100644 index fcd10f03..00000000 --- a/src/equicordplugins/soundBoardLogger/components/CloneSoundModal.tsx +++ /dev/null @@ -1,193 +0,0 @@ -/* - * Vencord, a Discord client mod - * Copyright (c) 2023 Vendicated and contributors - * SPDX-License-Identifier: GPL-3.0-or-later - */ - -import { Flex } from "@components/Flex"; -import { Margins } from "@utils/margins"; -import { classes } from "@utils/misc"; -import { closeModal, ModalCloseButton,ModalContent, ModalHeader, ModalRoot, openModal } from "@utils/modal"; -import { LazyComponent } from "@utils/react"; -import { find, findByPropsLazy } from "@webpack"; -import { Button, Clickable, Forms, GuildStore, PermissionsBits, PermissionStore, Popout, SearchableSelect, showToast, Text, TextInput, Toasts, useMemo, UserStore, useState } from "@webpack/common"; -import { Guild } from "discord-types/general"; -import { HtmlHTMLAttributes } from "react"; - -import { cl, getEmojiUrl,SoundEvent } from "../utils"; - -export function openCloneSoundModal(item) { - const key = openModal(props => - - closeModal(key)} /> - - ); -} - -// Thanks https://github.com/Vendicated/Vencord/blob/ea11f2244fde469ce308f8a4e7224430be62f8f1/src/plugins/emoteCloner/index.tsx#L173-L177 -const getFontSize = (s: string, small: boolean = false) => { - const sizes = [20, 20, 18, 18, 16, 14, 12]; - return sizes[s.length + (small ? 1 : 0)] ?? 8; -}; - -function GuildAcronym({ acronym, small, style = {} }) { - return ( - - {acronym} - - ); -} - -function CustomInput({ children, className = "", ...props }: HtmlHTMLAttributes) { - return
- {children} -
; -} - -const EmojiPicker = LazyComponent(() => find(e => e.default?.type?.render?.toString?.().includes?.(".updateNewlyAddedLastSeen)")).default); - -const sounds = findByPropsLazy("uploadSound", "updateSound"); - -export function CloneSoundModal({ item, closeModal }: { item: SoundEvent, closeModal: () => void; }) { - const ownedGuilds = useMemo(() => { - return Object.values(GuildStore.getGuilds()).filter(guild => - guild.ownerId === UserStore.getCurrentUser().id || - (PermissionStore.getGuildPermissions({ id: guild.id }) & PermissionsBits.CREATE_GUILD_EXPRESSIONS) === PermissionsBits.CREATE_GUILD_EXPRESSIONS); - }, []); - - const [selectedGuild, setSelectedGuild] = useState(null); - const [soundName, setSoundName] = useState(undefined); - const [soundEmoji, setSoundEmoji] = useState(undefined); - const [loadingButton, setLoadingButton] = useState(false); - const [show, setShow] = useState(false); - - const isEmojiValid = soundEmoji?.guildId ? soundEmoji.guildId === selectedGuild?.id : true; - - const styles = { - selected: { height: "24px", width: "24px" }, - nonselected: { width: "36px", height: "36px", marginTop: "4px" } - }; - const getStyle = key => key === "selected" ? styles.selected : styles.nonselected; - - function onSelectEmoji(emoji) { - setShow(false); - setSoundEmoji(emoji); - } - - return <> - - - Clone Sound - - - - - Cloning Sound - - - {item.soundId} - - Add to server: - ({ - label: guild.name, - value: guild - })) - } - - placeholder="Select a server" - value={selectedGuild ? ({ - label: selectedGuild.name, - value: selectedGuild, - key: "selected" - }) : undefined} - - onChange={v => setSelectedGuild(v)} - closeOnSelect={true} - renderOptionPrefix={v => v ? ( - v.value.icon ? - : - - ) : null} - /> - -
- Sound Name - setSoundName(v)} placeholder="Sound Name" /> -
-
- Related Emoji - setShow(false)} - renderPopout={() => selectedGuild?.id }} onSelectEmoji={onSelectEmoji} />} - > - {() => ( - setShow(v => !v)}> - - {soundEmoji ? - <> - - :{soundEmoji.name ? soundEmoji.name.split("~")[0] : soundEmoji.uniqueName}: - : - <> - - Click to Select - - } - - - )} - -
-
- {!isEmojiValid && You can't use that emoji in that server} - -
- ; -} diff --git a/src/equicordplugins/soundBoardLogger/components/SoundBoardLog.tsx b/src/equicordplugins/soundBoardLogger/components/SoundBoardLog.tsx index e824ef5c..67b29a57 100644 --- a/src/equicordplugins/soundBoardLogger/components/SoundBoardLog.tsx +++ b/src/equicordplugins/soundBoardLogger/components/SoundBoardLog.tsx @@ -13,8 +13,7 @@ import { Button, Clickable, ContextMenuApi, FluxDispatcher, Forms, Menu, Text, T import { User } from "discord-types/general"; import { clearLoggedSounds, getLoggedSounds } from "../store"; -import { addListener, AvatarStyles, cl, downloadAudio, getEmojiUrl, getSoundboardVolume, playSound, removeListener, SoundLogEntry, UserSummaryItem } from "../utils"; -import { openCloneSoundModal } from "./CloneSoundModal"; +import { addListener, AvatarStyles, cl, downloadAudio, getEmojiUrl, playSound, removeListener, SoundLogEntry, UserSummaryItem } from "../utils"; import { openMoreUsersModal } from "./MoreUsersModal"; import { openUserModal } from "./UserModal"; @@ -100,13 +99,6 @@ export default function SoundBoardLog({ data, closeModal }) { navId="soundboardlogger-sound-menu" onClose={() => FluxDispatcher.dispatch({ type: "CONTEXT_MENU_CLOSE" })} > - - openCloneSoundModal(item)} - /> - ); } @@ -164,7 +156,7 @@ export default function SoundBoardLog({ data, closeModal }) { - + {({ onMouseEnter, onMouseLeave }) => } diff --git a/src/equicordplugins/soundBoardLogger/utils.ts b/src/equicordplugins/soundBoardLogger/utils.ts index f7e99e2b..7bbfc433 100644 --- a/src/equicordplugins/soundBoardLogger/utils.ts +++ b/src/equicordplugins/soundBoardLogger/utils.ts @@ -39,14 +39,9 @@ export function getEmojiUrl(emoji) { return emoji.id ? `https://cdn.discordapp.com/emojis/${emoji.id}.png?size=32` : getURL(emoji.name); } -const v1 = findByPropsLazy("amplitudeToPerceptual"); -const v2 = findByPropsLazy("getAmplitudinalSoundboardVolume"); - -export const getSoundboardVolume = () => v1.amplitudeToPerceptual(v2.getAmplitudinalSoundboardVolume()); - export const playSound = id => { const audio = new Audio(`https://cdn.discordapp.com/soundboard-sounds/${id}`); - audio.volume = getSoundboardVolume() / 100; + audio.volume = 75 / 100; audio.play(); }; diff --git a/src/equicordplugins/whosWatching/index.tsx b/src/equicordplugins/whosWatching/index.tsx index 0aedbf9f..76fd3c43 100644 --- a/src/equicordplugins/whosWatching/index.tsx +++ b/src/equicordplugins/whosWatching/index.tsx @@ -62,9 +62,6 @@ function Watching({ userIds, guildId }: WatchingProps): JSX.Element { } const ApplicationStreamingStore = findStoreLazy("ApplicationStreamingStore"); -const { encodeStreamKey }: { - encodeStreamKey: (any) => string; -} = findByPropsLazy("encodeStreamKey"); const UserSummaryItem = findComponentByCodeLazy("defaultRenderUser", "showDefaultAvatarsForNullUsers"); const AvatarStyles = findByPropsLazy("moreUsers", "emptyUser", "avatarContainer", "clickableAvatar"); @@ -80,8 +77,8 @@ export default definePlugin({ { find: ".Masks.STATUS_SCREENSHARE,width:32", replacement: { - match: /default:function\(\)\{return (\i)\}/, - replace: "default:function(){return $self.component({OriginalComponent:$1})}" + match: /(\i):function\(\)\{return (\i)\}/, + replace: "$1:function(){return $self.component({OriginalComponent:$2})}" } }, { @@ -98,7 +95,7 @@ export default definePlugin({ if (!stream) return
{props.children}
; - const userIds = ApplicationStreamingStore.getViewerIds(encodeStreamKey(stream)); + const userIds = ApplicationStreamingStore.getViewerIds(stream); let missingUsers = 0; const users = userIds.map(id => UserStore.getUser(id)).filter(user => Boolean(user) ? true : (missingUsers += 1, false)); @@ -160,7 +157,7 @@ export default definePlugin({ component: function ({ OriginalComponent }) { return (props: any) => { const stream = useStateFromStores([ApplicationStreamingStore], () => ApplicationStreamingStore.getCurrentUserActiveStream()); - const viewers = ApplicationStreamingStore.getViewerIds(encodeStreamKey(stream)); + const viewers = ApplicationStreamingStore.getViewerIds(stream); return }> {({ onMouseEnter, onMouseLeave }) => (
diff --git a/src/equicordplugins/youtubeDescription/index.tsx b/src/equicordplugins/youtubeDescription/index.tsx index f18a5833..1d93d070 100644 --- a/src/equicordplugins/youtubeDescription/index.tsx +++ b/src/equicordplugins/youtubeDescription/index.tsx @@ -20,7 +20,7 @@ export default definePlugin({ { find: ".Messages.SUPPRESS_ALL_EMBEDS", replacement: { - match: /case (\i\.MessageEmbedTypes\.VIDEO):(case \i\.MessageEmbedTypes\.\i:)*break;default:(\i)=(?:(this\.renderDescription)\(\))\}/, + match: /case (\i\.\i\.VIDEO):(case \i\.\i\.\i:)*break;default:(\i)=(?:(this\.renderDescription)\(\))\}/, replace: "$2 break; case $1: $3 = $self.ToggleableDescriptionWrapper({ embed: this.props.embed, original: $4.bind(this) }); break; default: $3 = $4() }" } } diff --git a/src/plugins/mutualGroupDMs/index.tsx b/src/plugins/mutualGroupDMs/index.tsx index 211910f0..a01c156d 100644 --- a/src/plugins/mutualGroupDMs/index.tsx +++ b/src/plugins/mutualGroupDMs/index.tsx @@ -65,15 +65,15 @@ export default definePlugin({ } }, { - find: "Messages.USER_PROFILE_MUTUAL_GUILDS_PLACEHOLDER).with", + find: /Messages\.USER_PROFILE_MUTUAL_GUILDS_PLACEHOLDER\)\.with\(0,\(\)=>\i\.\i\.Messages\.USER_PROFILE_NO_MUTUAL_SERVERS/, group: true, replacement: [ { - match: /(user:(\i),.+?=\i,)(.+?)(\i\.push)(.+?UserProfileSections\.MUTUAL_GUILDS,text:.{0,250}}\)\)}\))/, + match: /(user:(\i),.+?=\i,)(.+?)(\i\.push)(.+?\i\.MUTUAL_GUILDS,text:.{0,250}}\)\)}\))/, replace: '$1vencordMutualGroupsTabLabel=$self.useGDMCount($2.id),$3$5,$4({section:"MUTUAL_GDMS",text:vencordMutualGroupsTabLabel})' }, { - match: /(?<=(\i)===\i\.UserProfileSections\.MUTUAL_GUILDS?.{0,150}\}\):)/, + match: /(?<=(\i)===\i\.\i\i\.MUTUAL_GUILDS?.{0,150}\}\):)/, replace: '$1==="MUTUAL_GDMS"?$self.renderMutualGDMs(arguments[0]):' }, ]