Skip to content

Commit bddbb64

Browse files
Merge pull request #3203 from getAlby/fix-twitter-battery
fix: twitter battery
2 parents 51124ca + efaf10b commit bddbb64

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/extension/content-script/batteries/Twitter.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ declare global {
77
}
88
}
99

10-
const urlMatcher = /^https:\/\/(mobile.)?twitter\.com\/(\w+).*/;
10+
const urlMatcher = /^https:\/\/(mobile.)?(twitter|x)\.com\/(\w+).*/;
1111

1212
function getUsername() {
1313
const matchData = document.location.toString().match(urlMatcher);
14-
if (matchData) return matchData[2];
14+
if (matchData) return matchData[3];
1515
return "";
1616
}
1717

0 commit comments

Comments
 (0)