mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-08 14:13:01 -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: {
|
memberList: {
|
||||||
type: OptionType.BOOLEAN,
|
type: OptionType.BOOLEAN,
|
||||||
default: true,
|
default: false,
|
||||||
description: "Show usernames in member list",
|
description: "Show usernames in member list",
|
||||||
},
|
},
|
||||||
voiceChannelList: {
|
voiceChannelList: {
|
||||||
type: OptionType.BOOLEAN,
|
type: OptionType.BOOLEAN,
|
||||||
default: true,
|
default: false,
|
||||||
description: "Show usernames in voice channel list",
|
description: "Show usernames in voice channel list",
|
||||||
},
|
},
|
||||||
|
emojiReactions: {
|
||||||
|
type: OptionType.BOOLEAN,
|
||||||
|
default: false,
|
||||||
|
description: "Show usernames in emoji reactions",
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
function getUsername(user: any): string {
|
function getUsername(user: any): string {
|
||||||
|
@ -80,11 +85,11 @@ export default definePlugin({
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
find: "._areActivitiesExperimentallyHidden=(",
|
find: "._areActivitiesExperimentallyHidden=(",
|
||||||
|
predicate: () => settings.store.memberList,
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /(?<=user:(\i),currentUser:\i,nick:)\i/,
|
match: /(?<=user:(\i),currentUser:\i,nick:)\i/,
|
||||||
replace: "$self.getUsername($1)"
|
replace: "$self.getUsername($1)"
|
||||||
},
|
},
|
||||||
predicate: () => settings.store.memberList
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
find: ".usernameSpeaking]",
|
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,
|
settings,
|
||||||
getUsername,
|
getUsername,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue