diff options
author | Ryan Cao <70191398+ryanccn@users.noreply.github.com> | 2023-04-15 08:31:36 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-15 02:31:36 +0200 |
commit | ca91ef4e39cb338200b553eeab905f3f04537940 (patch) | |
tree | 9deaeb3ae4a1fb88f462bb2e43582b0c69794256 /src/plugins | |
parent | db7fc3769b40961f6fd0b64d092f9e9e82552018 (diff) | |
download | Vencord-ca91ef4e39cb338200b553eeab905f3f04537940.tar.gz Vencord-ca91ef4e39cb338200b553eeab905f3f04537940.tar.bz2 Vencord-ca91ef4e39cb338200b553eeab905f3f04537940.zip |
feat(moreUserTags): add HTML data attributes to user tags (#883)
Co-authored-by: V <vendicated@riseup.net>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/moreUserTags.ts | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/plugins/moreUserTags.ts b/src/plugins/moreUserTags.ts index e45e30a..3fa0aa1 100644 --- a/src/plugins/moreUserTags.ts +++ b/src/plugins/moreUserTags.ts @@ -118,7 +118,7 @@ const settings = definePluginSettings({ export default definePlugin({ name: "MoreUserTags", description: "Adds tags for webhooks and moderative roles (owner, admin, etc.)", - authors: [Devs.Cyn, Devs.TheSun], + authors: [Devs.Cyn, Devs.TheSun, Devs.RyanCaoDev], settings, patches: [ // add tags to the tag list @@ -140,6 +140,11 @@ export default definePlugin({ { match: /(\i)=(\i)===\i\.ORIGINAL_POSTER/, replace: "$1=$self.isOPTag($2)" + }, + // add HTML data attributes (for easier theming) + { + match: /children:\[(?=\i,\(0,\i\.jsx\)\("span",{className:\i\(\)\.botText,children:(\i)}\)\])/, + replace: "'data-tag':$1.toLowerCase(),children:[" } ], }, |