Skip to content

Commit 6e8d814

Browse files
authored
Add overview tab to isUserProfileMainTab (#34)
1 parent 9ed8836 commit 6e8d814

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ collect.set('isDashboard', [
6161
'https://github.com/?tab=stars', // Gotcha for `isUserProfileStarsTab`
6262
'https://github.com/?tab=followers', // Gotcha for `isUserProfileFollowersTab`
6363
'https://github.com/?tab=following', // Gotcha for `isUserProfileFollowingTab`
64+
'https://github.com/?tab=overview', // Gotcha for `isUserProfileMainTab`
6465
]);
6566

6667
export const isEnterprise = (url: URL | Location = location): boolean => url.hostname !== 'github.com' && url.hostname !== 'gist.github.com';
@@ -388,8 +389,7 @@ collect.set('isBranches', [
388389

389390
export const isUserProfile = (): boolean => exists('.user-profile-nav');
390391

391-
export const isUserProfileMainTab = (): boolean =>
392-
isUserProfile() && !new URLSearchParams(location.search).get('tab');
392+
export const isUserProfileMainTab = (): boolean => exists('[aria-label="User profile"] > .selected:first-child');
393393

394394
export const isUserProfileRepoTab = (): boolean =>
395395
isUserProfile() &&

0 commit comments

Comments
 (0)