We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 51124ca + efaf10b commit bddbb64Copy full SHA for bddbb64
src/extension/content-script/batteries/Twitter.ts
@@ -7,11 +7,11 @@ declare global {
7
}
8
9
10
-const urlMatcher = /^https:\/\/(mobile.)?twitter\.com\/(\w+).*/;
+const urlMatcher = /^https:\/\/(mobile.)?(twitter|x)\.com\/(\w+).*/;
11
12
function getUsername() {
13
const matchData = document.location.toString().match(urlMatcher);
14
- if (matchData) return matchData[2];
+ if (matchData) return matchData[3];
15
return "";
16
17
0 commit comments