Fix ServerInfo, ShowMeYourName & WebContextMenus

This commit is contained in:
Vendicated 2025-04-30 03:58:46 +02:00
parent dad69e0d0f
commit 9fa91c193d
No known key found for this signature in database
GPG key ID: D66986BAF75ECF18
4 changed files with 12 additions and 5 deletions

View file

@ -16,7 +16,7 @@ import { FluxDispatcher, Forms, GuildChannelStore, GuildMemberStore, GuildStore,
import { Guild, User } from "discord-types/general";
const IconClasses = findByPropsLazy("icon", "acronym", "childWrapper");
const FriendRow = findComponentByCodeLazy(".listName,discriminatorClass");
const FriendRow = findComponentByCodeLazy("discriminatorClass:", ".isMobileOnline", "getAvatarURL");
const cl = classNameFactory("vc-gp-");

View file

@ -50,7 +50,6 @@
border-bottom: 2px solid transparent;
color: var(--interactive-normal);
cursor: pointer;
height: 39px;
line-height: 14px;
}

View file

@ -48,9 +48,10 @@ export default definePlugin({
authors: [Devs.Rini, Devs.TheKodeToad],
patches: [
{
find: '?"@":""',
find: '"BaseUsername"',
replacement: {
match: /(?<=onContextMenu:\i,children:)\i\+\i/,
/* TODO: remove \i+\i once change makes it to stable */
match: /(?<=onContextMenu:\i,children:)(?:\i\+\i|\i)/,
replace: "$self.renderUsername(arguments[0])"
}
},

View file

@ -120,6 +120,13 @@ export default definePlugin({
]
},
{
find: "Copy image not supported",
replacement: {
match: /(?<=(?:canSaveImage|canCopyImage)\(\i?\)\{.{0,50})!\i\.isPlatformEmbedded/g,
replace: "false"
}
},
// Add back Copy & Save Image
{
find: 'id:"copy-image"',
@ -130,7 +137,7 @@ export default definePlugin({
replace: "false"
},
{
match: /return\s*?\[\i\.\i\.canCopyImage\(\)/,
match: /return\s*?\[.{0,50}?(?=\?.{0,100}?id:"copy-image")/,
replace: "return [true"
},
{