aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/apiBadges.tsx
diff options
context:
space:
mode:
authorVendicated <vendicated@riseup.net>2023-04-18 02:47:48 +0200
committerVendicated <vendicated@riseup.net>2023-04-18 02:47:48 +0200
commit993c6be2198ea18fec6d969bfd4d071221238a06 (patch)
tree955391e12ffd0641d7b2a7ba345f889096a3af5e /src/plugins/apiBadges.tsx
parente2e1cf2bfdfc83f6a2f33d7f77f6fabecb142e67 (diff)
downloadVencord-993c6be2198ea18fec6d969bfd4d071221238a06.tar.gz
Vencord-993c6be2198ea18fec6d969bfd4d071221238a06.tar.bz2
Vencord-993c6be2198ea18fec6d969bfd4d071221238a06.zip
Fix badges
Diffstat (limited to 'src/plugins/apiBadges.tsx')
-rw-r--r--src/plugins/apiBadges.tsx14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/plugins/apiBadges.tsx b/src/plugins/apiBadges.tsx
index 6167dd0..7847340 100644
--- a/src/plugins/apiBadges.tsx
+++ b/src/plugins/apiBadges.tsx
@@ -56,21 +56,17 @@ export default definePlugin({
authors: [Devs.Megu, Devs.Ven, Devs.TheSun],
required: true,
patches: [
- /* Patch the badges array */
- {
- find: "Messages.ACTIVE_DEVELOPER_BADGE_TOOLTIP",
- replacement: {
- match: /(?<=void 0:)\i.getBadges\(\)/,
- replace: "Vencord.Api.Badges._getBadges(arguments[0]).concat($&??[])",
- }
- },
/* Patch the badge list component on user profiles */
{
find: "Messages.PROFILE_USER_BADGES,role:",
replacement: [
{
+ match: /(?<=void 0:)\i.getBadges\(\)/,
+ replace: "Vencord.Api.Badges._getBadges(arguments[0]).concat($&??[])",
+ },
+ {
// alt: "", aria-hidden: false, src: originalSrc
- match: /alt:" ","aria-hidden":!0,src:(?=.{0,10}\b(\i)\.(?:icon|key))/g,
+ match: /alt:" ","aria-hidden":!0,src:(?=(\i)\.src)/g,
// ...badge.props, ..., src: badge.image ?? ...
replace: "...$1.props,$& $1.image??"
},