@@ -474,6 +474,26 @@ collect.set('isBranches', [
474
474
'https://github.com/sindresorhus/refined-github/branches' ,
475
475
] ) ;
476
476
477
+ export const isProfile = ( url : URL | HTMLAnchorElement | Location = location ) : boolean => {
478
+ const pathname = getCleanPathname ( url ) ;
479
+ return pathname . length > 0 && ! pathname . includes ( '/' ) && ! reservedNames . includes ( pathname ) ;
480
+ } ;
481
+
482
+ collect . set ( 'isProfile' , [
483
+ 'https://github.com/fregante' ,
484
+ 'https://github.com/github' ,
485
+ 'https://github.com/babel' ,
486
+ 'https://github.com/fregante?tab=repositories' ,
487
+ 'https://github.com/fregante?tab=repositories&type=source' ,
488
+ 'https://github.com/fregante?tab=repositories&q=&type=source&language=css&sort=' ,
489
+ 'https://github.com/fregante?tab=stars' ,
490
+ 'https://github.com/fregante?direction=desc&sort=updated&tab=stars' ,
491
+ 'https://github.com/fregante?tab=followers' ,
492
+ 'https://github.com/sindresorhus?tab=followers' ,
493
+ 'https://github.com/fregante?tab=following' ,
494
+ 'https://github.com/sindresorhus?tab=following' ,
495
+ ] ) ;
496
+
477
497
export const isUserProfile = ( ) : boolean => exists ( '.user-profile-nav' ) ;
478
498
479
499
export const isUserProfileMainTab = ( ) : boolean => exists ( '[aria-label="User profile"] > .selected:first-child' ) ;
0 commit comments