mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-07 21:53:04 -04:00
ShowMeYourName Add EmojiReactions Setting
This commit is contained in:
parent
efd1821fad
commit
1e02050bb3
1 changed files with 18 additions and 3 deletions
|
@ -48,14 +48,19 @@ const settings = definePluginSettings({
|
|||
},
|
||||
memberList: {
|
||||
type: OptionType.BOOLEAN,
|
||||
default: true,
|
||||
default: false,
|
||||
description: "Show usernames in member list",
|
||||
},
|
||||
voiceChannelList: {
|
||||
type: OptionType.BOOLEAN,
|
||||
default: true,
|
||||
default: false,
|
||||
description: "Show usernames in voice channel list",
|
||||
},
|
||||
emojiReactions: {
|
||||
type: OptionType.BOOLEAN,
|
||||
default: false,
|
||||
description: "Show usernames in emoji reactions",
|
||||
},
|
||||
});
|
||||
|
||||
function getUsername(user: any): string {
|
||||
|
@ -80,11 +85,11 @@ export default definePlugin({
|
|||
},
|
||||
{
|
||||
find: "._areActivitiesExperimentallyHidden=(",
|
||||
predicate: () => settings.store.memberList,
|
||||
replacement: {
|
||||
match: /(?<=user:(\i),currentUser:\i,nick:)\i/,
|
||||
replace: "$self.getUsername($1)"
|
||||
},
|
||||
predicate: () => settings.store.memberList
|
||||
},
|
||||
{
|
||||
find: ".usernameSpeaking]",
|
||||
|
@ -96,6 +101,16 @@ export default definePlugin({
|
|||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
find: "#{intl::REACTION_TOOLTIP_1}",
|
||||
predicate: () => settings.store.emojiReactions,
|
||||
replacement: [
|
||||
{
|
||||
match: /\i\.\i\.getName\(\i,null==.{0,15},(\i)\)/g,
|
||||
replace: "$self.getUsername($1),"
|
||||
},
|
||||
]
|
||||
},
|
||||
],
|
||||
settings,
|
||||
getUsername,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue