@@ -298,16 +298,25 @@ collect.set('isEditingFile', [
298298 'https://github.com/sindresorhus/refined-github/edit/ghe-injection/source/background.ts' ,
299299] ) ;
300300
301+ export const hasFileEditor = ( url : URL | HTMLAnchorElement | Location = location ) : boolean => isEditingFile ( url ) || isNewFile ( url ) || isDeletingFile ( url ) ;
302+ collect . set ( 'hasFileEditor' , combinedTestOnly ) ;
303+
301304export const isEditingRelease = ( url : URL | HTMLAnchorElement | Location = location ) : boolean => Boolean ( getRepo ( url ) ?. path . startsWith ( 'releases/edit' ) ) ;
302305collect . set ( 'isEditingRelease' , [
303306 'https://github.com/sindresorhus/refined-github/releases/edit/v1.2.3' ,
304307] ) ;
305308
309+ export const hasReleaseEditor = ( url : URL | HTMLAnchorElement | Location = location ) : boolean => isEditingRelease ( url ) || isNewRelease ( url ) ;
310+ collect . set ( 'hasReleaseEditor' , combinedTestOnly ) ;
311+
306312export const isEditingWikiPage = ( url : URL | HTMLAnchorElement | Location = location ) : boolean => isRepoWiki ( url ) && getCleanPathname ( url ) . endsWith ( '/_edit' ) ;
307313collect . set ( 'isEditingWikiPage' , [
308314 'https://github.com/tooomm/wikitest/wiki/Getting-Started/_edit' ,
309315] ) ;
310316
317+ export const hasWikiPageEditor = ( url : URL | HTMLAnchorElement | Location = location ) : boolean => isEditingWikiPage ( url ) || isNewWikiPage ( url ) ;
318+ collect . set ( 'hasWikiPageEditor' , combinedTestOnly ) ;
319+
311320export const isRepo = ( url : URL | HTMLAnchorElement | Location = location ) : boolean => / ^ [ ^ / ] + \/ [ ^ / ] + / . test ( getCleanPathname ( url ) )
312321 && ! reservedNames . includes ( url . pathname . split ( '/' , 2 ) [ 1 ] ! )
313322 && ! isDashboard ( url )
@@ -580,7 +589,7 @@ export const hasRichTextEditor = (url: URL | HTMLAnchorElement | Location = loca
580589 || isNewIssue ( url )
581590 || isCompare ( url )
582591 || isRepliesSettings ( url )
583- || isNewRelease ( url )
592+ || hasReleaseEditor ( url )
584593 || isDiscussion ( url ) ;
585594
586595collect . set ( 'hasCode' , combinedTestOnly ) ;
0 commit comments