@@ -58,6 +58,9 @@ collect.set('isDashboard', [
5858 'https://not-github.com/' ,
5959 'https://my-little-hub.com/' ,
6060 'https://github.com/?tab=repositories' , // Gotcha for `isUserProfileRepoTab`
61+ 'https://github.com/?tab=stars' , // Gotcha for `isUserProfileStarsTab`
62+ 'https://github.com/?tab=followers' , // Gotcha for `isUserProfileFollowersTab`
63+ 'https://github.com/?tab=following' , // Gotcha for `isUserProfileFollowingTab`
6164] ) ;
6265
6366export const isEnterprise = ( url : URL | Location = location ) : boolean => url . hostname !== 'github.com' && url . hostname !== 'gist.github.com' ;
@@ -354,10 +357,25 @@ collect.set('isBranches', [
354357
355358export const isUserProfile = ( ) : boolean => exists ( '.user-profile-nav' ) ;
356359
360+ export const isUserProfileMainTab = ( ) : boolean =>
361+ isUserProfile ( ) && ! new URLSearchParams ( location . search ) . get ( 'tab' ) ;
362+
357363export const isUserProfileRepoTab = ( ) : boolean =>
358364 isUserProfile ( ) &&
359365 new URLSearchParams ( location . search ) . get ( 'tab' ) === 'repositories' ;
360366
367+ export const isUserProfileStarsTab = ( ) : boolean =>
368+ isUserProfile ( ) &&
369+ new URLSearchParams ( location . search ) . get ( 'tab' ) === 'stars' ;
370+
371+ export const isUserProfileFollowersTab = ( ) : boolean =>
372+ isUserProfile ( ) &&
373+ new URLSearchParams ( location . search ) . get ( 'tab' ) === 'followers' ;
374+
375+ export const isUserProfileFollowingTab = ( ) : boolean =>
376+ isUserProfile ( ) &&
377+ new URLSearchParams ( location . search ) . get ( 'tab' ) === 'following' ;
378+
361379export const isSingleTagPage = ( url : URL | Location = location ) : boolean => / ^ ( r e l e a s e s \/ t a g ) / . test ( getRepoPath ( url ) ! ) ;
362380collect . set ( 'isSingleTagPage' , [
363381 'https://github.com/sindresorhus/refined-github/releases/tag/v1.0.0-beta.4' ,
0 commit comments