Skip to content

Commit ac05b45

Browse files
committed
WhatsApp: Fix unknown number stripping for country codes with 3 digits and non-English text.
1 parent 7e537e7 commit ac05b45

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

WhatsAppA11yFixes.user.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,10 +214,10 @@ const DYNAMIC_TWEAKS = [
214214
// Remove phone numbers for unknown contacts. These have a slightly different
215215
// format for normal chats and group chats.
216216
const m = el.ariaLabel.match(
217-
/^(?:Maybe (.*? ))?\+\d{1,2} [\d ]+ (.*)$/s
217+
/^(?:[^\d ]+ (.*? ))?\+\d{1,3} [\d ]+ (.*)$/s
218218
);
219219
if (m) {
220-
el.ariaLabel = `Maybe ${m[1] || ""} ${m[2]}`;
220+
el.ariaLabel = `~ ${m[1] || ""} ${m[2]}`;
221221
}
222222
}},
223223
];

0 commit comments

Comments
 (0)