@@ -112,9 +112,9 @@ collect.set('isIssue', [
112
112
] ) ;
113
113
114
114
export const isConversationList = ( url : URL | HTMLAnchorElement | Location = location ) : boolean =>
115
- isGlobalConversationList ( url ) ||
116
- isRepoConversationList ( url ) ||
117
- isMilestone ( url ) ;
115
+ isGlobalConversationList ( url )
116
+ || isRepoConversationList ( url )
117
+ || isMilestone ( url ) ;
118
118
collect . set ( 'isConversationList' , combinedTestOnly ) ;
119
119
120
120
export const isConversation = ( url : URL | HTMLAnchorElement | Location = location ) : boolean => isIssue ( url ) || isPRConversation ( url ) ;
@@ -277,12 +277,12 @@ collect.set('isEditingWikiPage', [
277
277
'https://github.com/tooomm/wikitest/wiki/Getting-Started/_edit' ,
278
278
] ) ;
279
279
280
- export const isRepo = ( url : URL | HTMLAnchorElement | Location = location ) : boolean => / ^ [ ^ / ] + \/ [ ^ / ] + / . test ( getCleanPathname ( url ) ) &&
281
- ! reservedNames . includes ( url . pathname . split ( '/' , 2 ) [ 1 ] ! ) &&
282
- ! isDashboard ( url ) &&
283
- ! isGist ( url ) &&
284
- ! isRepoSearch ( url ) &&
285
- ! isNewRepoTemplate ( url ) ;
280
+ export const isRepo = ( url : URL | HTMLAnchorElement | Location = location ) : boolean => / ^ [ ^ / ] + \/ [ ^ / ] + / . test ( getCleanPathname ( url ) )
281
+ && ! reservedNames . includes ( url . pathname . split ( '/' , 2 ) [ 1 ] ! )
282
+ && ! isDashboard ( url )
283
+ && ! isGist ( url )
284
+ && ! isRepoSearch ( url )
285
+ && ! isNewRepoTemplate ( url ) ;
286
286
collect . set ( 'isRepo' , [
287
287
// Some of these are here simply as "gotchas" to other detections
288
288
'https://github.com/sindresorhus/refined-github/blame/master/package.json' ,
@@ -309,9 +309,9 @@ collect.set('isRepoTaxonomyConversationList', [
309
309
] ) ;
310
310
311
311
export const isRepoConversationList = ( url : URL | HTMLAnchorElement | Location = location ) : boolean =>
312
- isRepoPRList ( url ) ||
313
- isRepoIssueList ( url ) ||
314
- isRepoTaxonomyConversationList ( url ) ;
312
+ isRepoPRList ( url )
313
+ || isRepoIssueList ( url )
314
+ || isRepoTaxonomyConversationList ( url ) ;
315
315
collect . set ( 'isRepoConversationList' , combinedTestOnly ) ;
316
316
317
317
export const isRepoPRList = ( url : URL | HTMLAnchorElement | Location = location ) : boolean => Boolean ( getRepo ( url ) ?. path . startsWith ( 'pulls' ) ) ;
@@ -479,20 +479,20 @@ export const isUserProfile = (): boolean => exists('.user-profile-nav');
479
479
export const isUserProfileMainTab = ( ) : boolean => exists ( '[aria-label="User profile"] > .selected:first-child' ) ;
480
480
481
481
export const isUserProfileRepoTab = ( ) : boolean =>
482
- isUserProfile ( ) &&
483
- new URLSearchParams ( location . search ) . get ( 'tab' ) === 'repositories' ;
482
+ isUserProfile ( )
483
+ && new URLSearchParams ( location . search ) . get ( 'tab' ) === 'repositories' ;
484
484
485
485
export const isUserProfileStarsTab = ( ) : boolean =>
486
- isUserProfile ( ) &&
487
- new URLSearchParams ( location . search ) . get ( 'tab' ) === 'stars' ;
486
+ isUserProfile ( )
487
+ && new URLSearchParams ( location . search ) . get ( 'tab' ) === 'stars' ;
488
488
489
489
export const isUserProfileFollowersTab = ( ) : boolean =>
490
- isUserProfile ( ) &&
491
- new URLSearchParams ( location . search ) . get ( 'tab' ) === 'followers' ;
490
+ isUserProfile ( )
491
+ && new URLSearchParams ( location . search ) . get ( 'tab' ) === 'followers' ;
492
492
493
493
export const isUserProfileFollowingTab = ( ) : boolean =>
494
- isUserProfile ( ) &&
495
- new URLSearchParams ( location . search ) . get ( 'tab' ) === 'following' ;
494
+ isUserProfile ( )
495
+ && new URLSearchParams ( location . search ) . get ( 'tab' ) === 'following' ;
496
496
497
497
export const isSingleTag = ( url : URL | HTMLAnchorElement | Location = location ) : boolean => / ^ ( r e l e a s e s \/ t a g ) / . test ( getRepo ( url ) ?. path ! ) ;
498
498
collect . set ( 'isSingleTag' , [
@@ -502,29 +502,29 @@ collect.set('isSingleTag', [
502
502
503
503
collect . set ( 'hasComments' , combinedTestOnly ) ;
504
504
export const hasComments = ( url : URL | HTMLAnchorElement | Location = location ) : boolean =>
505
- isPR ( url ) ||
506
- isIssue ( url ) ||
507
- isCommit ( url ) ||
508
- isOrganizationDiscussion ( url ) ||
509
- isSingleGist ( url ) ;
505
+ isPR ( url )
506
+ || isIssue ( url )
507
+ || isCommit ( url )
508
+ || isOrganizationDiscussion ( url )
509
+ || isSingleGist ( url ) ;
510
510
511
511
collect . set ( 'hasRichTextEditor' , combinedTestOnly ) ;
512
512
export const hasRichTextEditor = ( url : URL | HTMLAnchorElement | Location = location ) : boolean =>
513
- hasComments ( url ) ||
514
- isNewIssue ( url ) ||
515
- isCompare ( url ) ||
516
- isRepliesSettings ( url ) ||
517
- isNewRelease ( url ) ||
518
- isDiscussion ( url ) ;
513
+ hasComments ( url )
514
+ || isNewIssue ( url )
515
+ || isCompare ( url )
516
+ || isRepliesSettings ( url )
517
+ || isNewRelease ( url )
518
+ || isDiscussion ( url ) ;
519
519
520
520
collect . set ( 'hasCode' , combinedTestOnly ) ;
521
521
export const hasCode = ( url : URL | HTMLAnchorElement | Location = location ) : boolean => // Static code, not the editor
522
- hasComments ( url ) ||
523
- isRepoTree ( url ) || // Readme files
524
- isSingleFile ( url ) ||
525
- isGist ( url ) ||
526
- isCompare ( url ) ||
527
- isBlame ( url ) ;
522
+ hasComments ( url )
523
+ || isRepoTree ( url ) // Readme files
524
+ || isSingleFile ( url )
525
+ || isGist ( url )
526
+ || isCompare ( url )
527
+ || isBlame ( url ) ;
528
528
529
529
export const isMarketplaceAction = ( url : URL | HTMLAnchorElement | Location = location ) : boolean => url . pathname . startsWith ( '/marketplace/actions/' ) ;
530
530
collect . set ( 'isMarketplaceAction' , [
0 commit comments