most of the fixes

This commit is contained in:
thororen1234 2026-04-24 11:41:23 -04:00
parent 995d8831fd
commit f0b7b04086
No known key found for this signature in database
33 changed files with 221 additions and 71 deletions

View file

@ -536,4 +536,5 @@ export type ColorPicker = ComponentType<{
suggestedColors?: string[];
label?: ReactNode;
onChange(value: number | null): void;
disabled?: boolean;
}>;

View file

@ -13,7 +13,7 @@ export default definePlugin({
authors: [Devs.thororen],
patches: [
{
find: /\.POPOUT,onClose:\i}\),nicknameIcons:.+?\.isProvisional/,
find: "#{intl::XcTHmQ::raw}",
replacement: {
match: /user:\i,widgets:.{0,100}?\}\),/,
replace: "$&Vencord.Api.ProfileCollections.renderProfileCollections(arguments[0]),",

View file

@ -24,7 +24,7 @@ export default definePlugin({
find: '"],{numberOfBlockedUsers:',
replacement: [
{
match: /(?<=\}=(\i).*?\]\}\))/,
match: /(?<=listType:\i,numberOfUsers:\i\}=(\i).*?\]\}\))/,
replace: ",$1.listType==='blocked'?$self.renderSearchInput():null"
},
{

View file

@ -41,7 +41,7 @@ export default definePlugin({
find: "#{intl::xdCLeM::raw}",
replacement: [
{
match: /profile:\i\}\),.{0,15}profile:\i/,
match: /profile:\i\}\),.{0,20}profile:\i(?=.{0,20}profile:\i)/,
replace: "$&,invite:arguments[0].invite"
}
]

View file

@ -225,7 +225,7 @@ export default definePlugin({
{
find: "ACTIVE_NOW_COLUMN)",
replacement: {
match: /(\i\.\i),\{(?=\}\)\])/,
match: /(\i),\{(?=\}\)\])/,
replace: '"div",{children:$self.activeNowView($1())'
}
},

View file

@ -34,10 +34,8 @@ import type {
AnchorProps,
AvatarProps,
BadgeShapesType,
ChipProps,
CircleBadgeProps,
ClickableProps,
ColorPickerProps,
ColorPickerWithSwatchesProps,
ColorSwatchProps,
ConfirmModalProps,
@ -52,18 +50,13 @@ import type {
GuildIconProps,
IconBadgeProps,
LocalErrorBoundaryProps,
ManaBaseRadioGroupProps,
ManaButtonProps,
ManaCalendarProps,
ManaCheckboxGroupProps,
ManaCheckboxProps,
ManaComboboxProps,
ManaDatePickerProps,
ManaListboxProps,
ManaPopoverProps,
ManaRichTooltipProps,
ManaSelectProps,
ManaSwitchProps,
ManaTextAreaProps,
ManaTextButtonProps,
ManaTextInputProps,
@ -78,11 +71,8 @@ import type {
PremiumBadgeProps,
ProgressBarProps,
SearchBarProps,
SimpleErrorBoundaryProps,
SkeletonProps,
SliderProps,
SpinnerComponent,
StandaloneRadioIndicatorProps,
TextBadgeProps,
TimestampProps,
ToastData,
@ -121,21 +111,15 @@ export const Clickable = findByCodeLazy("ignoreKeyPress", "renderNonInteractive"
export const ManaButton = findComponentByCodeLazy('"data-mana-component":"button"') as React.ComponentType<ManaButtonProps>;
export const ManaTextButton = findComponentByCodeLazy('"data-mana-component":"text-button"') as React.ComponentType<ManaTextButtonProps>;
export const ManaSwitch = findComponentByCodeLazy('"data-mana-component":"switch"') as React.ComponentType<ManaSwitchProps>;
export const ManaTextInput = findComponentByCodeLazy('"data-mana-component":"text-input"') as React.ComponentType<ManaTextInputProps>;
export const ManaTextArea = findComponentByCodeLazy('"data-mana-component":"text-area"') as React.ComponentType<ManaTextAreaProps>;
export const ManaCheckbox = findComponentByCodeLazy('"data-mana-component":"checkbox"') as React.ComponentType<ManaCheckboxProps>;
export const ManaSelect = findComponentByCodeLazy('"data-mana-component":"select"') as React.ComponentType<ManaSelectProps>;
export const ManaCalendar = findComponentByCodeLazy('"data-mana-component":"calendar"') as React.ComponentType<ManaCalendarProps>;
export const ManaDatePicker = findComponentByCodeLazy('"data-mana-component":"date-picker"') as React.ComponentType<ManaDatePickerProps>;
export const ManaListbox = findComponentByCodeLazy('"data-mana-component":"listbox"') as React.ComponentType<ManaListboxProps>;
export const ManaCheckboxGroup = findComponentByCodeLazy('"data-mana-component":"checkbox-group"') as React.ComponentType<ManaCheckboxGroupProps>;
export const ManaBaseRadioGroup = findComponentByCodeLazy('"data-mana-component":"BaseRadioGroup"') as React.ComponentType<ManaBaseRadioGroupProps>;
export const ManaCombobox = findComponentByCodeLazy("itemToString", "multiSelect", "maxVisibleItems") as React.ComponentType<ManaComboboxProps>;
export const ManaTooltip = findComponentByCodeLazy("VoidTooltip cannot find DOM node") as React.ComponentType<ManaTooltipProps>;
export const ManaRichTooltip = findComponentByCodeLazy('"data-mana-component":"rich-tooltip"') as React.ComponentType<ManaRichTooltipProps>;
export const ManaPopover = findByCodeLazy("title", "body", "badge", "graphic", "actions", "textLink", "gradientColor", "popoverRef") as React.ComponentType<ManaPopoverProps>;
export const StandaloneRadioIndicator = findComponentByCodeLazy("standaloneRadioIndicator", "animateIn", "animateOut") as React.ComponentType<StandaloneRadioIndicatorProps>;
export const Slider = findComponentByCodeLazy("stickToMarkers", "onMarkerRender", "grabberClassName") as React.ComponentType<SliderProps>;
export const Avatar = findComponentByCodeLazy("statusTooltip", "statusBackdropColor", "isSpeaking") as React.ComponentType<AvatarProps>;
@ -144,12 +128,9 @@ export const Spinner = findComponentByCodeLazy("spinningCircleSimple", "pulsingE
export const SearchBar = findComponentByCodeLazy("#{intl::SEARCH}", "clearable", "autoComplete") as React.ComponentType<SearchBarProps>;
export const Paginator = findComponentByCodeLazy("#{intl::BACK}", "#{intl::NEXT}", "renderPageWrapper") as React.ComponentType<PaginatorProps>;
export const Notice = findComponentByCodeLazy("messageType", '="text-default"', '="text-sm/medium"') as React.ComponentType<NoticeProps>;
export const Chip = findComponentByCodeLazy('variant:"eyebrow"', "chip,") as React.ComponentType<ChipProps>;
export const Skeleton = findComponentByCodeLazy("withHeader:t=!0,size:") as React.ComponentType<SkeletonProps>;
export const Accordion = findComponentByCodeLazy("scrollHeight)}", "onExpandedChange", "defaultExpanded") as React.ComponentType<AccordionProps>;
export const Timestamp = findComponentByCodeLazy("#{intl::MESSAGE_EDITED_TIMESTAMP_A11Y_LABEL}", "isVisibleOnlyOnHover") as React.ComponentType<TimestampProps>;
export const GuildIcon = findComponentByCodeLazy("Masks.CLAN_ICON,width", "acronymClassName") as React.ComponentType<GuildIconProps>;
export const ColorPicker = findComponentByCodeLazy("#{intl::USER_SETTINGS_PROFILE_COLOR_SELECT_COLOR}", "showEyeDropper") as React.ComponentType<ColorPickerProps>;
export const FocusLock = findComponentByCodeLazy(".containerRef,{keyboardModeEnabled:") as React.ComponentType<FocusLockProps>;
export const UserSummaryItem = findComponentByCodeLazy("popoutUserId") as React.ComponentType<UserSummaryItemProps>;
@ -366,5 +347,4 @@ export const ContextMenuApi: ContextMenuApiType = mapMangledModuleLazy('type:"CO
});
export const ErrorBoundary = findComponentByCodeLazy("this.resetErrorBoundary", "onReset", "FallbackComponent") as React.ComponentType<ErrorBoundaryProps>;
export const SimpleErrorBoundary = findComponentByCodeLazy("getDerivedStateFromError", "this.props.fallback") as React.ComponentType<SimpleErrorBoundaryProps>;
export const LocalErrorBoundary = findComponentByCodeLazy("LocalErrorBoundary", "text-feedback-critical") as React.ComponentType<LocalErrorBoundaryProps>;

View file

@ -4,7 +4,9 @@
* SPDX-License-Identifier: GPL-3.0-or-later
*/
import { ManaCalendar, ManaDatePicker, useState } from "..";
import { ManaCalendar, ManaDatePicker } from "@equicordplugins/components.dev";
import { useState } from "..";
import { DocPage, type PropDef } from "../DocPage";
const CALENDAR_PROPS: PropDef[] = [

View file

@ -4,7 +4,9 @@
* SPDX-License-Identifier: GPL-3.0-or-later
*/
import { Chip, Paragraph } from "..";
import { Chip } from "@equicordplugins/components.dev";
import { Paragraph } from "..";
import { DocPage, type PropDef } from "../DocPage";
const CHIP_COLORS = ["blurple", "purple", "green", "orange", "yellow", "pink", "red", "gray"] as const;

View file

@ -4,7 +4,9 @@
* SPDX-License-Identifier: GPL-3.0-or-later
*/
import { ColorPicker, ColorPickerWithSwatches, ColorSwatch, DefaultColorButton, Paragraph, PresetColors, useState } from "..";
import { ColorPicker } from "@webpack/common";
import { ColorPickerWithSwatches, ColorSwatch, DefaultColorButton, Paragraph, PresetColors, useState } from "..";
import { DocPage, type PropDef } from "../DocPage";
const DEFAULT_COLOR = 0x5865F2;
@ -58,29 +60,28 @@ const SWATCHES_PROPS: PropDef[] = [
];
function BasicPickerDemo() {
const [color, setColor] = useState(DEFAULT_COLOR);
const [color, setColor] = useState<number | null>(DEFAULT_COLOR);
return (
<>
<Paragraph color="text-muted" style={{ marginBottom: 8 }}>Selected: {intToHex(color)}</Paragraph>
<Paragraph color="text-muted" style={{ marginBottom: 8 }}>Selected: {color !== null ? intToHex(color) : DEFAULT_COLOR}</Paragraph>
<ColorPicker color={color} onChange={setColor} showEyeDropper={false} />
</>
);
}
function EyeDropperDemo() {
const [color, setColor] = useState(DEFAULT_COLOR);
const [color, setColor] = useState<number | null>(DEFAULT_COLOR);
return <ColorPicker color={color} onChange={setColor} showEyeDropper />;
}
function SuggestedDemo() {
const [color, setColor] = useState(0xE74C3C);
const [color, setColor] = useState<number | null>(0xE74C3C);
return (
<>
<Paragraph color="text-muted" style={{ marginBottom: 8 }}>Selected: {intToHex(color)}</Paragraph>
<ColorPicker
<Paragraph color="text-muted" style={{ marginBottom: 8 }}>Selected: {color !== null ? intToHex(color) : 0xE74C3C}</Paragraph> <ColorPicker
color={color}
onChange={setColor}
showEyeDropper={false}
@ -121,16 +122,16 @@ function SwatchesGridDemo() {
}
function FullPickerDemo() {
const [color, setColor] = useState(0x9B59B6);
const [color, setColor] = useState<number | null>(0x9B59B6);
return (
<>
<Paragraph color="text-muted" style={{ marginBottom: 8 }}>Selected: {intToHex(color)}</Paragraph>
<Paragraph color="text-muted" style={{ marginBottom: 8 }}>Selected: {color !== null ? intToHex(color) : 0x9B59B6}</Paragraph>
<ColorPickerWithSwatches
defaultColor={DEFAULT_COLOR}
customColor={color}
customColor={color !== null ? color : 0x9B59B6}
colors={[...PresetColors]}
value={color}
value={color !== null ? color : 0x9B59B6}
onChange={setColor}
renderDefaultButton={props => <DefaultColorButton {...props} />}
renderCustomButton={() => (

View file

@ -4,7 +4,9 @@
* SPDX-License-Identifier: GPL-3.0-or-later
*/
import { ManaCombobox, Paragraph, useState } from "..";
import { ManaCombobox } from "@equicordplugins/components.dev";
import { Paragraph, useState } from "..";
import { DocPage, type PropDef } from "../DocPage";
const COMBOBOX_PROPS: PropDef[] = [

View file

@ -4,7 +4,9 @@
* SPDX-License-Identifier: GPL-3.0-or-later
*/
import { Button, ErrorBoundary, LocalErrorBoundary, Paragraph, SimpleErrorBoundary, useState } from "..";
import { SimpleErrorBoundary } from "@equicordplugins/components.dev";
import { Button, ErrorBoundary, LocalErrorBoundary, Paragraph, useState } from "..";
import { DocPage, type PropDef, type PropGroup } from "../DocPage";
function ThrowError(): never {

View file

@ -4,7 +4,9 @@
* SPDX-License-Identifier: GPL-3.0-or-later
*/
import { ManaBaseRadioGroup, RadioOption, StandaloneRadioIndicator, useState } from "..";
import { ManaBaseRadioGroup, StandaloneRadioIndicator } from "@equicordplugins/components.dev";
import { RadioOption, useState } from "..";
import { DocPage, type PropDef, type PropGroup } from "../DocPage";
import { EquicordIcon } from "../icons/EquicordIcon";

View file

@ -4,7 +4,9 @@
* SPDX-License-Identifier: GPL-3.0-or-later
*/
import { ManaButton, Skeleton, useState } from "..";
import { Skeleton } from "@equicordplugins/components.dev";
import { ManaButton, useState } from "..";
import { DocPage, type PropDef } from "../DocPage";
const SKELETON_PROPS: PropDef[] = [

View file

@ -4,9 +4,10 @@
* SPDX-License-Identifier: GPL-3.0-or-later
*/
import { ManaSwitch } from "@equicordplugins/components.dev";
import { findComponentByCodeLazy } from "@webpack";
import { ManaSwitch, useState } from "..";
import { useState } from "..";
import { DocPage, type PropDef, type PropGroup } from "../DocPage";
interface SwitchWithLabelProps {

View file

@ -13,14 +13,135 @@ import { removeFromArray } from "@utils/misc";
import definePlugin, { StartAt } from "@utils/types";
import { SettingsRouter } from "@webpack/common";
import { ChipProps, ColorPickerProps, ManaBaseRadioGroupProps, ManaCalendarProps, ManaComboboxProps, ManaDatePickerProps, ManaSwitchProps, SimpleErrorBoundaryProps, SkeletonProps, StandaloneRadioIndicatorProps } from "./components";
import ComponentsTab from "./components/ComponentsTab";
export let Skeleton: React.ComponentType<SkeletonProps>;
export let Chip: React.ComponentType<ChipProps>;
export let StandaloneRadioIndicator: React.ComponentType<StandaloneRadioIndicatorProps>;
export let ManaCombobox: React.ComponentType<ManaComboboxProps>;
export let ManaBaseRadioGroup: React.ComponentType<ManaBaseRadioGroupProps>;
export let ManaDatePicker: React.ComponentType<ManaDatePickerProps>;
export let ManaCalendar: React.ComponentType<ManaCalendarProps>;
export let ManaSwitch: React.ComponentType<ManaSwitchProps>;
export let SimpleErrorBoundary: React.ComponentType<SimpleErrorBoundaryProps>;
export let ColorPicker: React.ComponentType<ColorPickerProps>;
export default definePlugin({
name: "Components",
description: "Adds a new tab to settings to browse Discord components.",
tags: ["Appearance", "Customisation", "Console", "Developers", "Organisation"],
authors: [Devs.prism],
dependencies: ["Settings"],
patches: [
{
find: /withHeader:\i=!0,size:/,
replacement: {
match: /(?=function (\i)\(\i\)\{.{0,50}withHeader:\i=!0)/,
replace: "$self.Skeleton=$1;"
}
},
{
find: '="grayLight"}',
replacement: {
match: /(?=function (\i)\(\i\)\{.{0,25}="grayLight"\})/,
replace: "$self.Chip=$1;"
}
},
{
find: ".standaloneRadioIndicator,",
replacement: {
match: /(?=function (\i)\(\i\)\{.{0,15}disabled:\i,isSelected:\i\})/,
replace: "$self.StandaloneRadioIndicator=$1;"
}
},
{
find: "#{intl::AUTOCOMPLETE_NO_RESULTS_BODY}",
replacement: {
match: /(?<=data-listbox-item-id".*?itemToString:\i\}\);)(?=function (\i)\(\i\)\{)/,
replace: "$self.ManaCombobox=$1;"
}
},
{
find: '"data-mana-component":"BaseRadioGroup"',
replacement: {
match: /(?=function (\i)\(\i\)\{.{0,400}"data-mana-component":"BaseRadioGroup")/,
replace: "$self.ManaBaseRadioGroup=$1;"
}
},
{
find: '"data-mana-component":"date-picker"',
replacement: {
match: /(?=function (\i)\(\i\)\{.{0,60},placeholderValue:\i)/,
replace: "$self.ManaDatePicker=$1;"
}
},
{
find: '"data-mana-component":"calendar"',
replacement: {
match: /(?=function (\i)\(\i\)\{.{0,400}"data-mana-component":"calendar")/,
replace: "$self.ManaCalendar=$1;"
}
},
{
find: '"data-mana-component":"switch"',
replacement: {
match: /(?=function (\i)\(\i\)\{.{0,50}focusProps:\i,hasIcon:)/,
replace: "$self.ManaSwitch=$1;"
}
},
{
find: '"data-mana-component":"switch"',
replacement: {
match: /(?=function (\i)\(\i\)\{.{0,50}focusProps:\i,hasIcon:)/,
replace: "$self.ManaSwitch=$1;"
}
},
{
find: "#{intl::zksHZO::raw}",
replacement: {
match: /(?=class (\i).{0,90}getDerivedStateFromError)/,
replace: "$self.SimpleErrorBoundary=$1;"
}
},
{
find: "#{intl::USER_SETTINGS_PROFILE_COLOR_SELECT_COLOR}),focusProps:",
replacement: {
match: /(?=function (\i)\(\i\)\{let\{onChange:\i,onClose:\i,[^}]+?showEyeDropper:)/,
replace: "$self.setColorPicker($1);"
}
},
],
set Skeleton(value: any) {
Skeleton = value;
},
set Chip(value: any) {
Chip = value;
},
set StandaloneRadioIndicator(value: any) {
StandaloneRadioIndicator = value;
},
set ManaCombobox(value: any) {
ManaCombobox = value;
},
set ManaBaseRadioGroup(value: any) {
ManaBaseRadioGroup = value;
},
set ManaDatePicker(value: any) {
ManaDatePicker = value;
},
set ManaCalendar(value: any) {
ManaCalendar = value;
},
set ManaSwitch(value: any) {
ManaSwitch = value;
},
set SimpleErrorBoundary(value: any) {
SimpleErrorBoundary = value;
},
set ColorPicker(value: any) {
ColorPicker = value;
},
startAt: StartAt.WebpackReady,
toolboxActions: {
"Open Components Tab"() {

View file

@ -149,7 +149,7 @@ export default definePlugin({
// Nameplate
find: ".MINI_PREVIEW,[",
replacement: {
match: /function \i\((\i)\)\{(?=let\{nameplate:\i,hovered:\i,selected:\i,content:\i,placement:\i\}=)/,
match: /function \i\((\i)\)\{(?=let.{1,5}\{nameplate:\i,)/,
replace: '$&if($1.placement!=="preview"&&$1.placement!=="mini_preview")return null;'
},
predicate: () => settings.store.removeNameplate,

View file

@ -51,7 +51,7 @@ export default definePlugin({
find: "#{intl::EMOJI_FAVORITE_TOOLTIP}",
replacement: [
{
match: /(ref:\i,children:)(\(0,\i.jsx\)\(\i.\i)/,
match: /(ref:\i,children:)(\(0,\i.jsxs?\)\(\i)/,
replace: "$1arguments[0]?.collected?.isDragging?$self.dragItem():$2",
},
{

View file

@ -172,7 +172,7 @@ export default definePlugin({
},
// Voice channel rows (guild sidebar fallback - li wrapper)
{
match: /(?<=getModeClass\(\),.{0,50})"data-dnd-name":.{0,25},children:\[/,
match: /(?<=this\.getModeClass\(\),.{0,50})"data-dnd-name":.{0,40},children:\[/g,
replace: "draggable:!0,onDragStart:e=>$self.onChannelDragStart(e,{id:this?.props?.channel?.id,guild_id:this?.props?.channel?.guild_id}),$&"
}
]
@ -181,7 +181,7 @@ export default definePlugin({
{
find: "handleClickChat",
replacement: {
match: /(?<=getModeClass\(\),.{0,50})"data-dnd-name":.{0,25},children:\[/,
match: /(?<=getModeClass\(\),.{0,50})"data-dnd-name":.{0,49},children:\[/,
replace: "draggable:!0,onDragStart:e=>$self.onChannelDragStart(e,{id:this?.props?.channel?.id,guild_id:this?.props?.channel?.guild_id}),$&"
}
},
@ -199,7 +199,7 @@ export default definePlugin({
{
find: "shouldShowThreadsPopout",
replacement: {
match: /(?<=getClassName\(\).{0,50})"data-dnd-name":.{0,25},onMouseEnter:/,
match: /(?<=getClassName\(\).{0,50})"data-dnd-name":.{0,40},onMouseEnter:/,
replace: "draggable:!0,onDragStart:e=>$self.onChannelDragStart(e,{id:this?.props?.channel?.id,guild_id:this?.props?.channel?.guild_id}),$&"
}
},

View file

@ -143,10 +143,10 @@ export default definePlugin({
},
// allow resolutions above 720p at 60fps
{
find: ".RESOLUTION_720&&",
find: ",setIsForceShowSharingPopout:",
replacement: {
match: /\i===\i\.\i\.RESOLUTION_720&&\i!==\i\.\i\.FPS_60/,
replace: "false",
match: /\i!==\i\.\i\.RESOLUTION_720\|\|\i===\i\.\i\.FPS_60/,
replace: "true",
},
predicate: () => settings.store.removeResolutionCap,
},

View file

@ -27,7 +27,7 @@ import { classNameFactory } from "@utils/css";
import { openModal } from "@utils/modal";
import definePlugin from "@utils/types";
import { Message } from "@vencord/discord-types";
import { findByCodeLazy, findComponentByCodeLazy, findCssClassesLazy, findExportedComponentLazy } from "@webpack";
import { findByCodeLazy, findCssClassesLazy, findExportedComponentLazy } from "@webpack";
import { ChannelStore, Menu } from "@webpack/common";
import { NoteModal } from "./components/modals/Notebook";
@ -40,7 +40,6 @@ export const MessageRecord = findByCodeLazy("isEdited(){");
export const messageClasses = findCssClassesLazy("message", "groupStart", "cozyMessage");
export const resultsClasses = findCssClassesLazy("emptyResultsWrap", "emptyResultsContent", "errorImage", "emptyResultsText", "noResultsImage", "alt");
export const ChannelRecord = findByCodeLazy("computeLurkerPermissionsAllowList(){");
export const ChannelMessage = findComponentByCodeLazy("Message must not be a thread");
const messageContextMenuPatch: NavContextMenuPatchCallback = (children, { message }: { message: Message; }) => {
children.push(
@ -68,12 +67,29 @@ function ToolBarHeader() {
);
}
let ChannelMessage;
export default definePlugin({
name: "HolyNotes",
description: "Save messages as notes to revisit later",
dependencies: ["MessagePopoverAPI", "HeaderBarAPI"],
tags: ["Chat", "Organisation"],
authors: [EquicordDevs.Wolfie],
patches: [
{
find: "Message must not be a thread starter message",
replacement: [
{
// Append messagelogger-deleted to classNames if deleted
match: /(?=let (\i)=\i\.memo\(function\(\i\)\{.{0,200}\.THREAD_STARTER_MESSAGE)/,
replace: "ChannelMessage=$1;"
},
],
}
],
set ChannelMessage(value: any) {
ChannelMessage = value;
},
toolboxActions: {
"Open Notes"() {

View file

@ -36,7 +36,7 @@ export default definePlugin({
replacement:
[
{
match: /(\(0,\i.jsx\)\(\i.\i,{}\))/,
match: /(\(0,\i.jsxs?\)\(\i,{}\))/,
replace: "arguments[0].user == null ? null : (vcIsTyping ? $self.TypingIcon() : $1)"
},
// define isTyping earlier in the function so i dont bReAk ThE rUlEs Of HoOkS

View file

@ -53,7 +53,7 @@ export default definePlugin({
find: ".GUILD_CREATE_INVITE_SUGGESTION,defaultMaxAge",
replacement: [
{
match: /(?<=maxAge:)\i\?\?\i\?\?\i\.\i/,
match: /(?<=maxAge:)\i\?\?\i\?\?\i/,
replace: "$self.settings.store.inviteDuration"
},
{

View file

@ -14,7 +14,7 @@ import ErrorBoundary from "@components/ErrorBoundary";
import { openPluginModal } from "@components/settings";
import { EquicordDevs } from "@utils/constants";
import { copyToClipboard } from "@utils/index";
import definePlugin, { PluginNative, ReporterTestable, StartAt } from "@utils/types";
import definePlugin, { PluginNative, StartAt } from "@utils/types";
import { findStoreLazy, onceReady } from "@webpack";
import { ContextMenuApi, Menu, NavigationRouter, RestAPI, useEffect, useState } from "@webpack/common";
import { JSX } from "react";

View file

@ -49,7 +49,7 @@ export default definePlugin({
match: /\i\.searchResultsQuery=(\i)/,
replace: "$&,$self.main($1)"
}
}
},
],
main(query) {
if (query.offset > 5000) {

View file

@ -338,7 +338,12 @@ export default definePlugin({
replace: "return [$1, vc_SidebarChat]}"
},
{
match: /(case \i\.\i.+?return)(.+?);(?=.+?params\.messageId)(?<=guild_products".+?)/g,
match: /(?<=guild_products".+?)(case \i\.\i.+?return)(.+?\}\));(?=.+?params\.messageId)/g,
replace: "$1[$2, vc_SidebarChat];",
predicate: () => settings.store.patchCommunity
},
{
match: /(case \i\.\i\.GAME_SERVERS:.*?\.CHANNEL.*?return)(.*?);/,
replace: "$1[$2, vc_SidebarChat];",
predicate: () => settings.store.patchCommunity
}

View file

@ -57,7 +57,7 @@ interface DiscordStatus {
}
// TODO: find clearCustomStatusHint original css/svg or replace
const PMenu = findComponentByCodeLazy("#{intl::MORE_OPTIONS}", ",renderSubmenu:");
let PMenu;
const EmojiComponent = findComponentByCodeLazy(/\.translateSurrogatesToInlineEmoji\(\i\.name\);/);
const CustomStatusSettings = getUserSettingLazy("status", "customStatus")!;
@ -163,8 +163,18 @@ export default definePlugin({
match: /(,\{onClose:\i\}\))\]/,
replace: "$1,$self.render()]"
}
}
},
{
find: "#{intl::MORE_OPTIONS}),...",
replacement: {
match: /(?<=targetElementRef:\i,spacing:.{0,150}className:\i\.\i,children:(\i)\(\)\}\)\})/,
replace: "$self.PMenu=$1;"
}
},
],
set PMenu(value: any) {
PMenu = value;
},
render() {
const status = CustomStatusSettings.getSetting();
return (

View file

@ -40,7 +40,7 @@ export default definePlugin({
group: true,
replacement: [
{
match: /return.{1,200},(?=keyboardModeEnabled)/,
match: /(?<=#{intl::CHANNEL_A11Y_LABEL};).{1,400},(?=keyboardModeEnabled:)/,
replace: "const vcWallpaperFreeUrl=$self.WallpaperState(arguments[0].channel);$&vcWallpaperFreeUrl,"
},
{

View file

@ -94,9 +94,9 @@ export default definePlugin({
}
},
{
find: "this.renderEmbeddedActivity()",
find: ",setIsForceShowSharingPopout:",
replacement: {
match: /"div"(?=.{0,40}?,this.renderActions\(\))/,
match: /"div"(?=.{0,50}stream:\i,canGoLive:\i)/,
replace: "$self.WrapperComponent"
}
}

View file

@ -84,8 +84,12 @@ export default definePlugin({
},
// Override limit of emojis to display with offset hook.
{
match: /(\i)\.length>4&&\((\i)\.length=4\);/,
replace: "let [moreQuickReactionsScrollValue,setMoreQuickReactionsScrollValue]=Vencord.Webpack.Common.React.useState(0);moreQuickReactionsScrollValue;"
match: /"MessageContextMenu"\},\{autoTrackExposure.{0,5}\}\),/,
replace: "$&[moreQuickReactionsScrollValue,setMoreQuickReactionsScrollValue]=Vencord.Webpack.Common.React.useState(0),"
},
{
match: /\.length>4&&\(\i\.length=4\)/,
replace: ""
},
// Add a custom class to identify the quick reactions have been modified and a CSS variable for the number of columns to display
{

View file

@ -20,7 +20,7 @@ import { FluxDispatcher, GuildChannelStore, GuildMemberStore, GuildRoleStore, Gu
import { settings } from ".";
const IconClasses = findCssClassesLazy("icon", "acronym", "childWrapper");
const FriendRow = findComponentByCodeLazy("discriminatorClass:", ".isMobileOnline", "getAvatarURL");
const FriendRow = findComponentByCodeLazy('"UserProfileMutualFriendRow"');
const cl = classNameFactory("vc-gp-");

View file

@ -1139,7 +1139,7 @@ export default definePlugin({
// Attach the group ID to their messages to allow animating gradients within a group.
find: "CUSTOM_GIFT?\"\":",
replacement: {
match: /(isHovered:(\i).{0,1300})(let \i=\i.id===\i,\i=)/,
match: /(keyboardModeEnabled.{0,20}&&\i,\i=\i\|\|(\i).*?)(let \i=\i.id===\i,\i=)/,
replace: "$1arguments[0].message.showMeYourNameGroupId=!!arguments[0].groupId?`g-${arguments[0].groupId}`:null;$self.handleHoveringMessage(arguments[0].message,$2);$3"
},
},
@ -1179,8 +1179,8 @@ export default definePlugin({
// Replace names in profile popouts.
find: "shouldWrap:!0,loop:!0,inProfile:!0",
replacement: {
match: /(tags:\i,)nickname:(\i)/,
replace: "$1showMeYourNameNickname:$2=$self.getTypingMemberListProfilesReactionsVoiceNameText({...arguments[0],type:\"profilesPopout\"})??(arguments[0].nickname)"
match: /displayName:(\i),(?=trailing:\i,|size:\i=|displayNameSize:\i)/g,
replace: "showMeYourNameNickname:$1=$self.getTypingMemberListProfilesReactionsVoiceNameText({...arguments[0],type:\"profilesPopout\"})??(arguments[0].nickname),"
},
},
{

View file

@ -74,7 +74,6 @@ export function setColorPicker(component: t.ColorPicker) {
ColorPicker = component;
}
export const UserSummaryItem = waitForComponent("UserSummaryItem", filters.componentByCode("defaultRenderUser", "showDefaultAvatarsForNullUsers"));
export let createScroller: ((scrollbarClassName: string, fadeClassName: string, customThemeClassName: string) => t.ScrollerThin) | undefined;

View file

@ -46,11 +46,11 @@ export const Constants: t.Constants = mapMangledModuleLazy('ME:"/users/@me"', {
export const RestAPI: t.RestAPI = findLazy(m => typeof m === "object" && m.del && m.put);
export const moment: typeof import("moment") = findByPropsLazy("parseTwoDigitYear");
export const hljs: typeof import("highlight.js").default = findByPropsLazy("highlight", "registerLanguage");
export const hljs: typeof import("highlight.js").default = findLazy(m => m.default?.highlight && m.default?.registerLanguage)?.default;
export const useDrag = findByCodeLazy("useDrag::spec.begin was deprecated");
// you cant make a better finder i love that they remove display names sm
export const useDrop = findByCodeLazy(".options);return", ".collect,");
export const useDrop = findByCodeLazy(".disconnectDropTarget()", ".dropTargetOptions=");
export const { match, P }: { match: typeof TSPattern["match"], P: typeof TSPattern["P"]; } = mapMangledModuleLazy("@ts-pattern/matcher", {
match: filters.byCode("return new"),