mirror of
https://github.com/Equicord/Equicord.git
synced 2025-02-25 09:38:52 -05:00
Merge branch 'dev'
This commit is contained in:
commit
1842046f8a
30 changed files with 84 additions and 238 deletions
|
@ -10,7 +10,7 @@ You can join our [discord server](https://discord.gg/5Xh2W87egW) for commits, ch
|
||||||
|
|
||||||
### Extra included plugins
|
### Extra included plugins
|
||||||
<details>
|
<details>
|
||||||
<summary>126 additional plugins</summary>
|
<summary>124 additional plugins</summary>
|
||||||
|
|
||||||
- AllCallTimers by MaxHerbold & D3SOX
|
- AllCallTimers by MaxHerbold & D3SOX
|
||||||
- AltKrispSwitch by newwares
|
- AltKrispSwitch by newwares
|
||||||
|
@ -34,7 +34,6 @@ You can join our [discord server](https://discord.gg/5Xh2W87egW) for commits, ch
|
||||||
- CuteAnimeBoys by ShadyGoat
|
- CuteAnimeBoys by ShadyGoat
|
||||||
- CuteNekos by echo
|
- CuteNekos by echo
|
||||||
- CutePats by thororen
|
- CutePats by thororen
|
||||||
- DeadMembers by Kyuuhachi
|
|
||||||
- Demonstration by Samwich
|
- Demonstration by Samwich
|
||||||
- DisableCameras by Joona
|
- DisableCameras by Joona
|
||||||
- DoNotLeak by Perny
|
- DoNotLeak by Perny
|
||||||
|
@ -105,7 +104,6 @@ You can join our [discord server](https://discord.gg/5Xh2W87egW) for commits, ch
|
||||||
- ScreenRecorder by AutumnVN (Vesktop & Equibop only)
|
- ScreenRecorder by AutumnVN (Vesktop & Equibop only)
|
||||||
- SearchFix by Jaxx
|
- SearchFix by Jaxx
|
||||||
- SekaiStickers by MaiKokain
|
- SekaiStickers by MaiKokain
|
||||||
- ServerSearch by camila314
|
|
||||||
- Shakespearean by vmohammad (Dev build only)
|
- Shakespearean by vmohammad (Dev build only)
|
||||||
- ShowBadgesInChat by Inbestigator & KrystalSkull
|
- ShowBadgesInChat by Inbestigator & KrystalSkull
|
||||||
- Slap by Korbo
|
- Slap by Korbo
|
||||||
|
|
|
@ -5,10 +5,12 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { addPreSendListener, removePreSendListener } from "@api/MessageEvents";
|
import { addPreSendListener, removePreSendListener } from "@api/MessageEvents";
|
||||||
|
import { migratePluginSettings } from "@api/Settings";
|
||||||
import { Devs } from "@utils/constants";
|
import { Devs } from "@utils/constants";
|
||||||
import definePlugin from "@utils/types";
|
import definePlugin from "@utils/types";
|
||||||
import { ChannelStore, GuildMemberStore, SelectedChannelStore, SelectedGuildStore } from "@webpack/common";
|
import { ChannelStore, GuildMemberStore, SelectedChannelStore, SelectedGuildStore } from "@webpack/common";
|
||||||
|
|
||||||
|
migratePluginSettings("AtSomeone", "atSomeone");
|
||||||
export default definePlugin({
|
export default definePlugin({
|
||||||
name: "AtSomeone",
|
name: "AtSomeone",
|
||||||
authors: [Devs.Joona],
|
authors: [Devs.Joona],
|
||||||
|
|
|
@ -79,7 +79,7 @@ export default definePlugin({
|
||||||
{
|
{
|
||||||
find: ".messagesPopoutWrap",
|
find: ".messagesPopoutWrap",
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /\i&&\((\i).maxHeight-=\d{1,3}\)/,
|
match: /\i&&\((\i).maxHeight.{0,5}\)/,
|
||||||
replace: "$&;$1.maxHeight-=$self.containerHeight"
|
replace: "$&;$1.maxHeight-=$self.containerHeight"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -216,7 +216,7 @@ export default definePlugin({
|
||||||
{
|
{
|
||||||
find: "}getMutualFriends(",
|
find: "}getMutualFriends(",
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /(getMutualFriends\(\i\){)return (\i\[\i\])/,
|
match: /(getMutualFriends\(\i\){)return (\i\.get\(\i\))/,
|
||||||
replace: "$1if($2 != undefined) return $2.filter(u => !$self.shouldHideUser(u.key))"
|
replace: "$1if($2 != undefined) return $2.filter(u => !$self.shouldHideUser(u.key))"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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: "Messages.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
|
|
||||||
: <DeadIndicator
|
|
||||||
channel={channel}
|
|
||||||
userId={message.author.id}
|
|
||||||
text={text}
|
|
||||||
/>;
|
|
||||||
},
|
|
||||||
|
|
||||||
wrapForumAuthor({ channel, user }, text) {
|
|
||||||
return !user
|
|
||||||
? text
|
|
||||||
: <DeadIndicator
|
|
||||||
channel={channel}
|
|
||||||
userId={user.id}
|
|
||||||
text={text}
|
|
||||||
/>;
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
function DeadIndicator({ channel, userId, text }) {
|
|
||||||
const isMember = useStateFromStores(
|
|
||||||
[GuildMemberStore],
|
|
||||||
() => GuildMemberStore.isMember(channel?.guild_id, userId),
|
|
||||||
);
|
|
||||||
return channel?.guild_id && !isMember ? <s className="c98-author-dead">{text}</s> : text;
|
|
||||||
}
|
|
|
@ -55,8 +55,8 @@ export default definePlugin({
|
||||||
find: ".defaultRules.text,match:",
|
find: ".defaultRules.text,match:",
|
||||||
group: true,
|
group: true,
|
||||||
replacement: {
|
replacement: {
|
||||||
// $)/)
|
// $) don't match with a " after the )
|
||||||
match: /\$\)\/\)}/,
|
match: /\$\)(?!")/,
|
||||||
// hsl(|rgb(|$&
|
// hsl(|rgb(|$&
|
||||||
replace: requiredFirstCharacters.join("|") + "|$&",
|
replace: requiredFirstCharacters.join("|") + "|$&",
|
||||||
},
|
},
|
||||||
|
|
|
@ -580,11 +580,10 @@ export default definePlugin({
|
||||||
{
|
{
|
||||||
find: '"MessageStore"',
|
find: '"MessageStore"',
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /LOAD_MESSAGES_SUCCESS:function\(\i\){/,
|
match: /(getOrCreate\(\i\);)(\i=\i\.loadComplete.*?}\),)/,
|
||||||
replace: "$&$self.messageLoadSuccess(arguments[0]);"
|
replace: "$1$self.messageLoadSuccess(arguments[0]);$2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
find: "THREAD_STARTER_MESSAGE?null===",
|
find: "THREAD_STARTER_MESSAGE?null===",
|
||||||
replacement: {
|
replacement: {
|
||||||
|
|
|
@ -58,12 +58,12 @@ export default definePlugin({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
find: "{})).SUBTLE=\"SUBTLE\"",
|
find: ".SUBTLE=\"SUBTLE\"",
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /\(0,\i\.useTransition\)*/,
|
match: /\(0,\i\.useTransition\)*/,
|
||||||
replace: "$self.nullTransition"
|
replace: "$self.nullTransition"
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
nullTransition(value: any, args: object) {
|
nullTransition(value: any, args: object) {
|
||||||
|
|
|
@ -53,9 +53,9 @@ export default definePlugin({
|
||||||
patches: [
|
patches: [
|
||||||
// how has this patch not broken yet lol (i do not like fixing patches tho)
|
// how has this patch not broken yet lol (i do not like fixing patches tho)
|
||||||
{
|
{
|
||||||
find: '="LocalActivityStore",',
|
find: '"LocalActivityStore"',
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /LOCAL_ACTIVITY_UPDATE:function\((\i)\)\{/,
|
match: /\i\((\i)\)\{.{0,50}activity.{0,10}=\i;/,
|
||||||
replace: "$&$self.patchActivity($1.activity);",
|
replace: "$&$self.patchActivity($1.activity);",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,59 +0,0 @@
|
||||||
/*
|
|
||||||
* Vencord, a Discord client mod
|
|
||||||
* Copyright (c) 2023 Vendicated, camila314, and contributors
|
|
||||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
|
||||||
*/
|
|
||||||
|
|
||||||
import "./styles.css";
|
|
||||||
|
|
||||||
import { addServerListElement, removeServerListElement, ServerListRenderPosition } from "@api/ServerList";
|
|
||||||
import ErrorBoundary from "@components/ErrorBoundary";
|
|
||||||
import { EquicordDevs } from "@utils/constants";
|
|
||||||
import definePlugin from "@utils/types";
|
|
||||||
import { findByCodeLazy } from "@webpack";
|
|
||||||
import { Tooltip } from "webpack/common/components";
|
|
||||||
|
|
||||||
const openPopout = findByCodeLazy(".QUICKSWITCHER_OPENED,{");
|
|
||||||
function SearchIcon() {
|
|
||||||
return (
|
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24" id="vc-searchbutton-icon">
|
|
||||||
<path
|
|
||||||
fill="currentColor"
|
|
||||||
fill-rule="evenodd"
|
|
||||||
d="M15.62 17.03a9 9 0 1 1 1.41-1.41l4.68 4.67a1 1 0 0 1-1.421.42l-4.67-4.68ZM17 10a7 7 0 1 1-14 0 7 7 0 0 1 14 0Z"
|
|
||||||
clip-rule="evenodd"></path>
|
|
||||||
</svg>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export default definePlugin({
|
|
||||||
name: "ServerSearch",
|
|
||||||
authors: [EquicordDevs.camila314],
|
|
||||||
description: "Navigate your servers better with a quick search button",
|
|
||||||
|
|
||||||
renderButton() {
|
|
||||||
return <ErrorBoundary noop>
|
|
||||||
<div id="vc-searchbutton-container">
|
|
||||||
<Tooltip text="Search" position="right">
|
|
||||||
{({ onMouseEnter, onMouseLeave }) => (
|
|
||||||
<div
|
|
||||||
id="vc-searchbutton"
|
|
||||||
onMouseEnter={onMouseEnter}
|
|
||||||
onMouseLeave={onMouseLeave}
|
|
||||||
onClick={() => openPopout("DM_SEARCH")}>
|
|
||||||
<SearchIcon />
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</Tooltip>
|
|
||||||
</div>
|
|
||||||
</ErrorBoundary>;
|
|
||||||
},
|
|
||||||
|
|
||||||
start() {
|
|
||||||
addServerListElement(ServerListRenderPosition.Above, this.renderButton);
|
|
||||||
},
|
|
||||||
|
|
||||||
stop() {
|
|
||||||
removeServerListElement(ServerListRenderPosition.Above, this.renderButton);
|
|
||||||
}
|
|
||||||
});
|
|
|
@ -1,33 +0,0 @@
|
||||||
#vc-searchbutton-container {
|
|
||||||
width: 100%;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
margin-bottom: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#vc-searchbutton {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
background-color: var(--background-primary);
|
|
||||||
height: 48px;
|
|
||||||
width: 48px;
|
|
||||||
border-radius: 100%;
|
|
||||||
transition: border-radius 0.15s ease-out, background-color 0.15s ease-out;
|
|
||||||
}
|
|
||||||
|
|
||||||
#vc-searchbutton-icon {
|
|
||||||
color: var(--text-normal);
|
|
||||||
}
|
|
||||||
|
|
||||||
#vc-searchbutton:hover {
|
|
||||||
border-radius: 34%;
|
|
||||||
background-color: var(--green-360);
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
#vc-searchbutton:hover #vc-searchbutton-icon {
|
|
||||||
color: var(--white-500);
|
|
||||||
}
|
|
|
@ -33,8 +33,8 @@ export default definePlugin({
|
||||||
replace: "if(Vencord.Api.Notices.currentNotice)return false;$&"
|
replace: "if(Vencord.Api.Notices.currentNotice)return false;$&"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
match: /(?<=,NOTICE_DISMISS:function\(\i\){)return null!=(\i)/,
|
match: /(?<=function (\i)\(\i\){)return null!=(\i)(?=.*NOTICE_DISMISS:\1)/,
|
||||||
replace: "if($1.id==\"EquicordNotice\")return($1=null,Vencord.Api.Notices.nextNotice(),true);$&"
|
replace: "if($2.id==\"VencordNotice\")return($2=null,Vencord.Api.Notices.nextNotice(),true);$&"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,7 +76,7 @@ export default definePlugin({
|
||||||
description: "Anonymise uploaded file names",
|
description: "Anonymise uploaded file names",
|
||||||
patches: [
|
patches: [
|
||||||
{
|
{
|
||||||
find: "instantBatchUpload:function",
|
find: "instantBatchUpload:",
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /uploadFiles:(\i),/,
|
match: /uploadFiles:(\i),/,
|
||||||
replace:
|
replace:
|
||||||
|
|
|
@ -126,7 +126,7 @@ export default definePlugin({
|
||||||
{
|
{
|
||||||
find: "Slow dispatch on",
|
find: "Slow dispatch on",
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /\i\.totalTime>100&&\i\.verbose\("Slow dispatch on ".+?\)\);/,
|
match: /\i\.totalTime>\i&&\i\.verbose\("Slow dispatch on ".+?\)\);/,
|
||||||
replace: ""
|
replace: ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -37,8 +37,8 @@ export default definePlugin({
|
||||||
find: 'type:"IDLE",idle:',
|
find: 'type:"IDLE",idle:',
|
||||||
replacement: [
|
replacement: [
|
||||||
{
|
{
|
||||||
match: /(?<=Date\.now\(\)-\i>)\i\.\i/,
|
match: /(?<=Date\.now\(\)-\i>)\i\.\i\|\|/,
|
||||||
replace: "$self.getIdleTimeout()"
|
replace: "$self.getIdleTimeout()||"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
match: /Math\.min\((\i\.\i\.getSetting\(\)\*\i\.\i\.\i\.SECOND),\i\.\i\)/,
|
match: /Math\.min\((\i\.\i\.getSetting\(\)\*\i\.\i\.\i\.SECOND),\i\.\i\)/,
|
||||||
|
|
|
@ -54,7 +54,7 @@ export default definePlugin({
|
||||||
replace: "$self.DecorationGridItem=$&"
|
replace: "$self.DecorationGridItem=$&"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
match: /(?<==)\i=>{let{user:\i,avatarDecoration.{300,600}decorationGridItemChurned/,
|
match: /(?<==)\i=>{let{user:\i,avatarDecoration/,
|
||||||
replace: "$self.DecorationGridDecoration=$&"
|
replace: "$self.DecorationGridDecoration=$&"
|
||||||
},
|
},
|
||||||
// Remove NEW label from decor avatar decorations
|
// Remove NEW label from decor avatar decorations
|
||||||
|
|
|
@ -254,11 +254,11 @@ export default definePlugin({
|
||||||
},
|
},
|
||||||
// Allow stickers to be sent everywhere
|
// Allow stickers to be sent everywhere
|
||||||
{
|
{
|
||||||
find: "canUseCustomStickersEverywhere:function",
|
find: "canUseCustomStickersEverywhere:",
|
||||||
predicate: () => settings.store.enableStickerBypass,
|
predicate: () => settings.store.enableStickerBypass,
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /canUseCustomStickersEverywhere:function\(\i\){/,
|
match: /(?<=canUseCustomStickersEverywhere:)\i/,
|
||||||
replace: "$&return true;"
|
replace: "()=>true"
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
// Make stickers always available
|
// Make stickers always available
|
||||||
|
@ -272,15 +272,15 @@ export default definePlugin({
|
||||||
},
|
},
|
||||||
// Allow streaming with high quality
|
// Allow streaming with high quality
|
||||||
{
|
{
|
||||||
find: "canUseHighVideoUploadQuality:function",
|
find: "canUseHighVideoUploadQuality:",
|
||||||
predicate: () => settings.store.enableStreamQualityBypass,
|
predicate: () => settings.store.enableStreamQualityBypass,
|
||||||
replacement: [
|
replacement: [
|
||||||
"canUseHighVideoUploadQuality",
|
"canUseHighVideoUploadQuality",
|
||||||
"canStreamQuality",
|
"canStreamQuality",
|
||||||
].map(func => {
|
].map(func => {
|
||||||
return {
|
return {
|
||||||
match: new RegExp(`${func}:function\\(\\i(?:,\\i)?\\){`, "g"),
|
match: new RegExp(`(?<=${func}:)\\i`, "g"),
|
||||||
replace: "$&return true;"
|
replace: "()=>true"
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
@ -295,10 +295,10 @@ export default definePlugin({
|
||||||
},
|
},
|
||||||
// Allow client themes to be changeable
|
// Allow client themes to be changeable
|
||||||
{
|
{
|
||||||
find: "canUseClientThemes:function",
|
find: "canUseClientThemes:",
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /canUseClientThemes:function\(\i\){/,
|
match: /(?<=canUseClientThemes:)\i/,
|
||||||
replace: "$&return true;"
|
replace: "()=>true"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -306,8 +306,8 @@ export default definePlugin({
|
||||||
replacement: [
|
replacement: [
|
||||||
{
|
{
|
||||||
// Overwrite incoming connection settings proto with our local settings
|
// Overwrite incoming connection settings proto with our local settings
|
||||||
match: /CONNECTION_OPEN:function\((\i)\){/,
|
match: /function (\i)\((\i)\){(?=.*CONNECTION_OPEN:\1)/,
|
||||||
replace: (m, props) => `${m}$self.handleProtoChange(${props}.userSettingsProto,${props}.user);`
|
replace: (m, funcName, props) => `${m}$self.handleProtoChange(${props}.userSettingsProto,${props}.user);`
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// Overwrite non local proto changes with our local settings
|
// Overwrite non local proto changes with our local settings
|
||||||
|
@ -400,10 +400,10 @@ export default definePlugin({
|
||||||
},
|
},
|
||||||
// Allow using custom app icons
|
// Allow using custom app icons
|
||||||
{
|
{
|
||||||
find: "canUsePremiumAppIcons:function",
|
find: "canUsePremiumAppIcons:",
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /canUsePremiumAppIcons:function\(\i\){/,
|
match: /(?<=canUsePremiumAppIcons:)\i/,
|
||||||
replace: "$&return true;"
|
replace: "()=>true"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// Separate patch for allowing using custom app icons
|
// Separate patch for allowing using custom app icons
|
||||||
|
@ -424,10 +424,10 @@ export default definePlugin({
|
||||||
},
|
},
|
||||||
// Allow using custom notification sounds
|
// Allow using custom notification sounds
|
||||||
{
|
{
|
||||||
find: "canUseCustomNotificationSounds:function",
|
find: "canUseCustomNotificationSounds:",
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /canUseCustomNotificationSounds:function\(\i\){/,
|
match: /(?<=canUseCustomNotificationSounds:)\i/,
|
||||||
replace: "$&return true;"
|
replace: "()=>true"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
|
@ -244,7 +244,7 @@ export default definePlugin({
|
||||||
|
|
||||||
patches: [
|
patches: [
|
||||||
{
|
{
|
||||||
find: '="LocalActivityStore",',
|
find: '"LocalActivityStore"',
|
||||||
replacement: [
|
replacement: [
|
||||||
{
|
{
|
||||||
match: /HANG_STATUS.+?(?=!\i\(\)\(\i,\i\)&&)(?<=(\i)\.push.+?)/,
|
match: /HANG_STATUS.+?(?=!\i\(\)\(\i,\i\)&&)(?<=(\i)\.push.+?)/,
|
||||||
|
@ -253,7 +253,7 @@ export default definePlugin({
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
find: '="ActivityTrackingStore",',
|
find: '"ActivityTrackingStore"',
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /getVisibleRunningGames\(\).+?;(?=for)(?<=(\i)=\i\.\i\.getVisibleRunningGames.+?)/,
|
match: /getVisibleRunningGames\(\).+?;(?=for)(?<=(\i)=\i\.\i\.getVisibleRunningGames.+?)/,
|
||||||
replace: (m, runningGames) => `${m}${runningGames}=${runningGames}.filter(({id,name})=>$self.isActivityNotIgnored({type:0,application_id:id,name}));`
|
replace: (m, runningGames) => `${m}${runningGames}=${runningGames}.filter(({id,name})=>$self.isActivityNotIgnored({type:0,application_id:id,name}));`
|
||||||
|
|
|
@ -323,35 +323,35 @@ export default definePlugin({
|
||||||
replacement: [
|
replacement: [
|
||||||
{
|
{
|
||||||
// Add deleted=true to all target messages in the MESSAGE_DELETE event
|
// Add deleted=true to all target messages in the MESSAGE_DELETE event
|
||||||
match: /MESSAGE_DELETE:function\((\i)\){let.+?((?:\i\.){2})getOrCreate.+?},/,
|
match: /function (\i)\((\i)\){let.+?((?:\i\.){2})getOrCreate.+?}(?=function.*MESSAGE_DELETE:\1)/,
|
||||||
replace:
|
replace:
|
||||||
"MESSAGE_DELETE:function($1){" +
|
"function $1($2){" +
|
||||||
" var cache = $2getOrCreate($1.channelId);" +
|
" var cache = $3getOrCreate($2.channelId);" +
|
||||||
" cache = $self.handleDelete(cache, $1, false);" +
|
" cache = $self.handleDelete(cache, $2, false);" +
|
||||||
" $2commit(cache);" +
|
" $3commit(cache);" +
|
||||||
"},"
|
"}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// Add deleted=true to all target messages in the MESSAGE_DELETE_BULK event
|
// Add deleted=true to all target messages in the MESSAGE_DELETE_BULK event
|
||||||
match: /MESSAGE_DELETE_BULK:function\((\i)\){let.+?((?:\i\.){2})getOrCreate.+?},/,
|
match: /function (\i)\((\i)\){let.+?((?:\i\.){2})getOrCreate.+?}(?=function.*MESSAGE_DELETE_BULK:\1)/,
|
||||||
replace:
|
replace:
|
||||||
"MESSAGE_DELETE_BULK:function($1){" +
|
"function $1($2){" +
|
||||||
" var cache = $2getOrCreate($1.channelId);" +
|
" var cache = $3getOrCreate($2.channelId);" +
|
||||||
" cache = $self.handleDelete(cache, $1, true);" +
|
" cache = $self.handleDelete(cache, $2, true);" +
|
||||||
" $2commit(cache);" +
|
" $3commit(cache);" +
|
||||||
"},"
|
"}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// Add current cached content + new edit time to cached message's editHistory
|
// Add current cached content + new edit time to cached message's editHistory
|
||||||
match: /(MESSAGE_UPDATE:function\((\i)\).+?)\.update\((\i)/,
|
match: /(function (\i)\((\i)\).+?)\.update\((\i)(?=.*MESSAGE_UPDATE:\2)/,
|
||||||
replace: "$1" +
|
replace: "$1" +
|
||||||
".update($3,m =>" +
|
".update($4,m =>" +
|
||||||
" (($2.message.flags & 64) === 64 || $self.shouldIgnore($2.message, true)) ? m :" +
|
" (($3.message.flags & 64) === 64 || $self.shouldIgnore($3.message, true)) ? m :" +
|
||||||
" $2.message.edited_timestamp && $2.message.content !== m.content ?" +
|
" $3.message.edited_timestamp && $3.message.content !== m.content ?" +
|
||||||
" m.set('editHistory',[...(m.editHistory || []), $self.makeEdit($2.message, m)]) :" +
|
" m.set('editHistory',[...(m.editHistory || []), $self.makeEdit($3.message, m)]) :" +
|
||||||
" m" +
|
" m" +
|
||||||
")" +
|
")" +
|
||||||
".update($3"
|
".update($4"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// fix up key (edit last message) attempting to edit a deleted message
|
// fix up key (edit last message) attempting to edit a deleted message
|
||||||
|
@ -465,12 +465,12 @@ export default definePlugin({
|
||||||
find: '"ReferencedMessageStore"',
|
find: '"ReferencedMessageStore"',
|
||||||
replacement: [
|
replacement: [
|
||||||
{
|
{
|
||||||
match: /MESSAGE_DELETE:function\((\i)\).+?},/,
|
match: /MESSAGE_DELETE:\i,/,
|
||||||
replace: "MESSAGE_DELETE:function($1){},"
|
replace: "MESSAGE_DELETE:()=>{},"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
match: /MESSAGE_DELETE_BULK:function\((\i)\).+?},/,
|
match: /MESSAGE_DELETE_BULK:\i,/,
|
||||||
replace: "MESSAGE_DELETE_BULK:function($1){},"
|
replace: "MESSAGE_DELETE_BULK:()=>{},"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
|
@ -182,8 +182,8 @@ export default definePlugin({
|
||||||
{
|
{
|
||||||
find: ".ORIGINAL_POSTER=",
|
find: ".ORIGINAL_POSTER=",
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /\((\i)=\{\}\)\)\[(\i)\.BOT/,
|
match: /(\i)=\{\}\)\);(?=let \i=100)/,
|
||||||
replace: "($1=$self.getTagTypes()))[$2.BOT"
|
replace: "$1=$self.getTagTypes()));"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -249,8 +249,8 @@ export default definePlugin({
|
||||||
match: /user:\i,nick:\i,/,
|
match: /user:\i,nick:\i,/,
|
||||||
replace: "$&moreTags_channelId,"
|
replace: "$&moreTags_channelId,"
|
||||||
}, {
|
}, {
|
||||||
match: /,botType:(\i),(?<=user:(\i).+?)/g,
|
match: /,botType:(\i),botVerified:(\i),(?!discriminatorClass:)(?<=user:(\i).+?)/g,
|
||||||
replace: ",botType:$self.getTag({user:$2,channelId:moreTags_channelId,origType:$1,location:'not-chat'}),"
|
replace: ",botType:$self.getTag({user:$3,channelId:moreTags_channelId,origType:$1,location:'not-chat'}),botVerified:$2,"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
|
@ -41,15 +41,15 @@ export default definePlugin({
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
...[
|
...[
|
||||||
'="MessageStore",',
|
'"MessageStore"',
|
||||||
'"displayName","ReadStateStore")'
|
'"displayName","ReadStateStore")'
|
||||||
].map(find => ({
|
].map(find => ({
|
||||||
find,
|
find,
|
||||||
predicate: () => Settings.plugins.NoBlockedMessages.ignoreBlockedMessages === true,
|
predicate: () => Settings.plugins.NoBlockedMessages.ignoreBlockedMessages === true,
|
||||||
replacement: [
|
replacement: [
|
||||||
{
|
{
|
||||||
match: /(?<=MESSAGE_CREATE:function\((\i)\){)/,
|
match: /(?<=function (\i)\((\i)\){)(?=.*MESSAGE_CREATE:\1)/,
|
||||||
replace: (_, props) => `if($self.isBlocked(${props}.message)||$self.isReplyToBlocked(${props}.message))return;`
|
replace: (_, _funcName, props) => `if($self.isBlocked(${props}.message))return;`
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
})),
|
})),
|
||||||
|
|
|
@ -74,10 +74,10 @@ export default definePlugin({
|
||||||
// This prevents the Message Requests tab from always hiding due to the previous patch (and is compatible with spam requests)
|
// This prevents the Message Requests tab from always hiding due to the previous patch (and is compatible with spam requests)
|
||||||
// In short, only the red badge is hidden. Button visibility behavior isn't changed.
|
// In short, only the red badge is hidden. Button visibility behavior isn't changed.
|
||||||
{
|
{
|
||||||
find: ".getSpamChannelsCount(),",
|
find: ".getSpamChannelsCount();",
|
||||||
predicate: () => settings.store.hideMessageRequestsCount,
|
predicate: () => settings.store.hideMessageRequestsCount,
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /(?<=getSpamChannelsCount\(\),\i=)\i\.getMessageRequestsCount\(\)/,
|
match: /(?<=getSpamChannelsCount\(\);return )\i\.getMessageRequestsCount\(\)/,
|
||||||
replace: "$self.getRealMessageRequestCount()"
|
replace: "$self.getRealMessageRequestCount()"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -69,8 +69,8 @@ export default definePlugin({
|
||||||
{
|
{
|
||||||
find: ".REPLY_QUOTE_MESSAGE_BLOCKED",
|
find: ".REPLY_QUOTE_MESSAGE_BLOCKED",
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /(?<="aria-label":\i,children:\[)(?=\i,\i,\i\])/,
|
match: /\.onClickReply,.+?}\),(?=\i,\i,\i\])/,
|
||||||
replace: "$self.ReplyTimestamp(arguments[0]),"
|
replace: "$&$self.ReplyTimestamp(arguments[0]),"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
|
@ -444,7 +444,7 @@ export default definePlugin({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
find: '="GuildChannelStore",',
|
find: '"GuildChannelStore"',
|
||||||
replacement: [
|
replacement: [
|
||||||
{
|
{
|
||||||
// Make GuildChannelStore contain hidden channels
|
// Make GuildChannelStore contain hidden channels
|
||||||
|
@ -453,7 +453,7 @@ export default definePlugin({
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// Filter hidden channels from GuildChannelStore.getChannels unless told otherwise
|
// Filter hidden channels from GuildChannelStore.getChannels unless told otherwise
|
||||||
match: /(?<=getChannels\(\i)(\){.+?)return (.+?)}/,
|
match: /(?<=getChannels\(\i)(\){.*?)return (.+?)}/,
|
||||||
replace: (_, rest, channels) => `,shouldIncludeHidden${rest}return $self.resolveGuildChannels(${channels},shouldIncludeHidden??arguments[0]==="@favorites");}`
|
replace: (_, rest, channels) => `,shouldIncludeHidden${rest}return $self.resolveGuildChannels(${channels},shouldIncludeHidden??arguments[0]==="@favorites");}`
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -48,7 +48,7 @@ export default definePlugin({
|
||||||
authors: [Devs.Rini, Devs.TheKodeToad],
|
authors: [Devs.Rini, Devs.TheKodeToad],
|
||||||
patches: [
|
patches: [
|
||||||
{
|
{
|
||||||
find: '?"@":"")',
|
find: '?"@":""',
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /(?<=onContextMenu:\i,children:).*?\)}/,
|
match: /(?<=onContextMenu:\i,children:).*?\)}/,
|
||||||
replace: "$self.renderUsername(arguments[0])}"
|
replace: "$self.renderUsername(arguments[0])}"
|
||||||
|
|
|
@ -42,8 +42,8 @@ export default definePlugin({
|
||||||
{
|
{
|
||||||
find: ",BURST_REACTION_EFFECT_PLAY",
|
find: ",BURST_REACTION_EFFECT_PLAY",
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /(BURST_REACTION_EFFECT_PLAY:\i=>{.{50,100})(\i\(\i,\i\))>=\d+/,
|
match: /((\i)=\i=>{.{50,100})(\i\(\i,\i\))>=\i(?=.*BURST_REACTION_EFFECT_PLAY:\2)/,
|
||||||
replace: "$1!$self.shouldPlayBurstReaction($2)"
|
replace: "$1!$self.shouldPlayBurstReaction($3)"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -21,7 +21,7 @@ const getDMChannelIcon = findByCodeLazy(".getChannelIconURL({");
|
||||||
const VoiceStateStore = findStoreLazy("VoiceStateStore");
|
const VoiceStateStore = findStoreLazy("VoiceStateStore");
|
||||||
|
|
||||||
const UserSummaryItem = findComponentByCodeLazy("defaultRenderUser", "showDefaultAvatarsForNullUsers");
|
const UserSummaryItem = findComponentByCodeLazy("defaultRenderUser", "showDefaultAvatarsForNullUsers");
|
||||||
const Avatar = findComponentByCodeLazy(".AVATAR_STATUS_TYPING_16;");
|
const Avatar = findComponentByCodeLazy(".status)/2):0");
|
||||||
const GroupDMAvatars = findComponentByCodeLazy(".AvatarSizeSpecs[", "getAvatarURL");
|
const GroupDMAvatars = findComponentByCodeLazy(".AvatarSizeSpecs[", "getAvatarURL");
|
||||||
|
|
||||||
const ActionButtonClasses = findByPropsLazy("actionButton", "highlight");
|
const ActionButtonClasses = findByPropsLazy("actionButton", "highlight");
|
||||||
|
|
|
@ -89,7 +89,7 @@ export default definePlugin({
|
||||||
find: "AudioContextSettingsMigrated",
|
find: "AudioContextSettingsMigrated",
|
||||||
replacement: [
|
replacement: [
|
||||||
{
|
{
|
||||||
match: /(?<=isLocalMute\(\i,\i\),volume:.+?volume:)\i(?=})/,
|
match: /(?<=isLocalMute\(\i,\i\),volume:(\i).+?\i\(\i,\i,)\1(?=\))/,
|
||||||
replace: "$&>200?200:$&"
|
replace: "$&>200?200:$&"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -109,11 +109,12 @@ export default definePlugin({
|
||||||
match: /(\i)\?null:\(0,\i\.jsx\)\(\i\.\i,{className:\i\.reactionCount,.*?}\),/,
|
match: /(\i)\?null:\(0,\i\.jsx\)\(\i\.\i,{className:\i\.reactionCount,.*?}\),/,
|
||||||
replace: "$&$1?null:$self.renderUsers(this.props),"
|
replace: "$&$1?null:$self.renderUsers(this.props),"
|
||||||
}
|
}
|
||||||
}, {
|
},
|
||||||
|
{
|
||||||
find: '"MessageReactionsStore"',
|
find: '"MessageReactionsStore"',
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /(?<=CONNECTION_OPEN:function\(\){)(\i)={}/,
|
match: /function (\i)\(\){(\i)={}(?=.*CONNECTION_OPEN:\1)/,
|
||||||
replace: "$&;$self.reactions=$1"
|
replace: "$&;$self.reactions=$2;"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -173,7 +173,7 @@ export const InviteActions = findByPropsLazy("resolveInvite");
|
||||||
export const IconUtils: t.IconUtils = findByPropsLazy("getGuildBannerURL", "getUserAvatarURL");
|
export const IconUtils: t.IconUtils = findByPropsLazy("getGuildBannerURL", "getUserAvatarURL");
|
||||||
|
|
||||||
export const ReadStateUtils = mapMangledModuleLazy('type:"ENABLE_AUTOMATIC_ACK",', {
|
export const ReadStateUtils = mapMangledModuleLazy('type:"ENABLE_AUTOMATIC_ACK",', {
|
||||||
ackChannel: filters.byCode(".getActiveJoinedThreadsForParent(")
|
ackChannel: filters.byCode(".isForumLikeChannel(")
|
||||||
});
|
});
|
||||||
|
|
||||||
export const ExpressionPickerStore: t.ExpressionPickerStore = mapMangledModuleLazy("expression-picker-last-active-view", {
|
export const ExpressionPickerStore: t.ExpressionPickerStore = mapMangledModuleLazy("expression-picker-last-active-view", {
|
||||||
|
|
Loading…
Add table
Reference in a new issue