@@ -151,6 +151,11 @@ collect.set('isNewRelease', [
151
151
'https://github.com/sindresorhus/refined-github/releases/new' ,
152
152
] ) ;
153
153
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
+
154
159
export const isNotifications = ( url : URL | HTMLAnchorElement | Location = location ) : boolean => getCleanPathname ( url ) === 'notifications' ;
155
160
collect . set ( 'isNotifications' , [
156
161
'https://github.com/notifications' ,
@@ -267,6 +272,11 @@ collect.set('isEditingRelease', [
267
272
'https://github.com/sindresorhus/refined-github/releases/edit/v1.2.3' ,
268
273
] ) ;
269
274
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
+
270
280
export const isRepo = ( url : URL | HTMLAnchorElement | Location = location ) : boolean => / ^ [ ^ / ] + \/ [ ^ / ] + / . test ( getCleanPathname ( url ) ) &&
271
281
! reservedNames . includes ( url . pathname . split ( '/' , 2 ) [ 1 ] ! ) &&
272
282
! isDashboard ( url ) &&
@@ -413,6 +423,8 @@ collect.set('isRepoTree', [
413
423
export const isRepoWiki = ( url : URL | HTMLAnchorElement | Location = location ) : boolean => Boolean ( getRepo ( url ) ?. path . startsWith ( 'wiki' ) ) ;
414
424
collect . set ( 'isRepoWiki' , [
415
425
'https://github.com/lukesampson/scoop/wiki' ,
426
+ 'https://github.com/tooomm/wikitest/wiki/_new' ,
427
+ 'https://github.com/tooomm/wikitest/wiki/Getting-Started/_edit' ,
416
428
] ) ;
417
429
418
430
export 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