From da2cf7d26a0b9455f5a6ad0ad84c9b2fd0440da0 Mon Sep 17 00:00:00 2001 From: lowercase_donkey Date: Tue, 7 Nov 2023 13:44:34 -0500 Subject: [PATCH] Replace all underscores in a handle, not just the first --- src/lib/domHelpers.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/domHelpers.ts b/src/lib/domHelpers.ts index d405523..b8b1270 100644 --- a/src/lib/domHelpers.ts +++ b/src/lib/domHelpers.ts @@ -33,7 +33,7 @@ export const removeReloadEl = () => { export const getAccountNameAndDisplayName = (userCell: Element) => { const [avatarEl, displayNameEl] = userCell?.querySelectorAll("a") const twAccountName = avatarEl?.getAttribute("href")?.replace("/", "") - const twAccountNameRemoveUnderscore = twAccountName.replace("_", "") // bsky does not allow underscore in handle. so remove it. + const twAccountNameRemoveUnderscore = twAccountName.replaceAll("_", "") // bsky does not allow underscores in handle, so remove them. const twDisplayName = displayNameEl?.textContent return { twAccountName, twDisplayName, twAccountNameRemoveUnderscore } }