@@ -151,6 +151,11 @@ collect.set('isNewRelease', [
151151 'https://github.com/sindresorhus/refined-github/releases/new' ,
152152] ) ;
153153
154+ export const isNewWikiPage = ( url : URL | HTMLAnchorElement | Location = location ) : boolean => isRepoWiki ( url ) && getCleanPathname ( url ) . endsWith ( '/_new' ) ;
155+ collect . set ( 'isNewWikiPage' , [
156+ 'https://github.com/tooomm/wikitest/wiki/_new' ,
157+ ] ) ;
158+
154159export const isNotifications = ( url : URL | HTMLAnchorElement | Location = location ) : boolean => getCleanPathname ( url ) === 'notifications' ;
155160collect . set ( 'isNotifications' , [
156161 'https://github.com/notifications' ,
@@ -267,6 +272,11 @@ collect.set('isEditingRelease', [
267272 'https://github.com/sindresorhus/refined-github/releases/edit/v1.2.3' ,
268273] ) ;
269274
275+ export const isEditingWikiPage = ( url : URL | HTMLAnchorElement | Location = location ) : boolean => isRepoWiki ( url ) && getCleanPathname ( url ) . endsWith ( '/_edit' ) ;
276+ collect . set ( 'isEditingWikiPage' , [
277+ 'https://github.com/tooomm/wikitest/wiki/Getting-Started/_edit' ,
278+ ] ) ;
279+
270280export const isRepo = ( url : URL | HTMLAnchorElement | Location = location ) : boolean => / ^ [ ^ / ] + \/ [ ^ / ] + / . test ( getCleanPathname ( url ) ) &&
271281 ! reservedNames . includes ( url . pathname . split ( '/' , 2 ) [ 1 ] ! ) &&
272282 ! isDashboard ( url ) &&
@@ -413,6 +423,8 @@ collect.set('isRepoTree', [
413423export const isRepoWiki = ( url : URL | HTMLAnchorElement | Location = location ) : boolean => Boolean ( getRepo ( url ) ?. path . startsWith ( 'wiki' ) ) ;
414424collect . set ( 'isRepoWiki' , [
415425 'https://github.com/lukesampson/scoop/wiki' ,
426+ 'https://github.com/tooomm/wikitest/wiki/_new' ,
427+ 'https://github.com/tooomm/wikitest/wiki/Getting-Started/_edit' ,
416428] ) ;
417429
418430export const isSingleCommit = ( url : URL | HTMLAnchorElement | Location = location ) : boolean => / ^ c o m m i t \/ [ \d a - f ] { 5 , 40 } / . test ( getRepo ( url ) ?. path ! ) ;
0 commit comments