aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAutumnVN <autumnvnchino@gmail.com>2023-09-21 22:40:37 +0700
committerGitHub <noreply@github.com>2023-09-21 17:40:37 +0200
commitd8c8b74ed7b03b0ff61e79ca71c03f689429b9d5 (patch)
tree73d759d0b59a7f8c0fd5a999af77ef4274aeaf09 /src
parentfadd1598f5cc848444e3ca5a8dde1ac916c3b0b4 (diff)
downloadVencord-d8c8b74ed7b03b0ff61e79ca71c03f689429b9d5.tar.gz
Vencord-d8c8b74ed7b03b0ff61e79ca71c03f689429b9d5.tar.bz2
Vencord-d8c8b74ed7b03b0ff61e79ca71c03f689429b9d5.zip
BetterRoleDot: Setting for copying role color in profile popout (#1698)
Diffstat (limited to 'src')
-rw-r--r--src/plugins/betterRoleDot.ts26
1 files changed, 25 insertions, 1 deletions
diff --git a/src/plugins/betterRoleDot.ts b/src/plugins/betterRoleDot.ts
index 773176d..2dd8c4a 100644
--- a/src/plugins/betterRoleDot.ts
+++ b/src/plugins/betterRoleDot.ts
@@ -23,7 +23,7 @@ import { Clipboard, Toasts } from "@webpack/common";
export default definePlugin({
name: "BetterRoleDot",
- authors: [Devs.Ven],
+ authors: [Devs.Ven, Devs.AutumnVN],
description:
"Copy role colour on RoleDot (accessibility setting) click. Also allows using both RoleDot and coloured names simultaneously",
@@ -43,6 +43,23 @@ export default definePlugin({
match: /"(?:username|dot)"===\i(?!\.\i)/g,
replace: "true",
},
+ },
+
+ {
+ find: ".ADD_ROLE_A11Y_LABEL",
+ predicate: () => Settings.plugins.BetterRoleDot.copyRoleColorInProfilePopout,
+ replacement: {
+ match: /"dot"===\i/,
+ replace: "true"
+ }
+ },
+ {
+ find: ".roleVerifiedIcon",
+ predicate: () => Settings.plugins.BetterRoleDot.copyRoleColorInProfilePopout,
+ replacement: {
+ match: /"dot"===\i/,
+ replace: "true"
+ }
}
],
@@ -50,7 +67,14 @@ export default definePlugin({
bothStyles: {
type: OptionType.BOOLEAN,
description: "Show both role dot and coloured names",
+ restartNeeded: true,
default: false,
+ },
+ copyRoleColorInProfilePopout: {
+ type: OptionType.BOOLEAN,
+ description: "Allow click on role dot in profile popout to copy role color",
+ restartNeeded: true,
+ default: false
}
},