mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-28 07:54:22 -04:00
feat(plugin): AlwaysExpandProfile
This commit is contained in:
parent
d2f9356f84
commit
90d62b672c
2 changed files with 30 additions and 1 deletions
28
src/equicordplugins/alwaysExpandProfile/index.ts
Normal file
28
src/equicordplugins/alwaysExpandProfile/index.ts
Normal file
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* Vencord, a Discord client mod
|
||||
* Copyright (c) 2025 Vendicated and contributors
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
import { EquicordDevs } from "@utils/constants";
|
||||
import { openUserProfile } from "@utils/discord";
|
||||
import definePlugin from "@utils/types";
|
||||
import { User } from "discord-types/general";
|
||||
|
||||
export default definePlugin({
|
||||
name: "AlwaysExpandProfile",
|
||||
description: "Always display a user's full popout",
|
||||
authors: [EquicordDevs.thororen],
|
||||
patches: [
|
||||
{
|
||||
find: ".hasAvatarForGuild(null==",
|
||||
replacement: {
|
||||
match: /(?<=user:(\i).*?===\i\.id.*?)return/,
|
||||
replace: "return $self.openUserProfile($1) ||"
|
||||
}
|
||||
}
|
||||
],
|
||||
openUserProfile(user: User) {
|
||||
openUserProfile(user.id);
|
||||
}
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue