Skip to content

Commit 1fe20d2

Browse files
authored
Add isRepoNetworkGraph and isRepoForksList (#58)
1 parent f8b8d8e commit 1fe20d2

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

index.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,16 @@ collect.set('isFileFinder', [
386386
'https://github.com/sindresorhus/refined-github/find/master',
387387
]);
388388

389+
export const isRepoForksList = (url: URL | HTMLAnchorElement | Location = location): boolean => getRepo(url)?.path === 'network/members';
390+
collect.set('isRepoForksList', [
391+
'https://github.com/sindresorhus/refined-github/network/members',
392+
]);
393+
394+
export const isRepoNetworkGraph = (url: URL | HTMLAnchorElement | Location = location): boolean => getRepo(url)?.path === 'network';
395+
collect.set('isRepoNetworkGraph', [
396+
'https://github.com/sindresorhus/refined-github/network',
397+
]);
398+
389399
export const isForkedRepo = (): boolean => exists('meta[name="octolytics-dimension-repository_is_fork"][content="true"]');
390400

391401
export const isSingleGist = (url: URL | HTMLAnchorElement | Location = location): boolean => isGist(url) && /^\/(gist\/)?[^/]+\/[\da-f]{32}$/.test(url.pathname);

0 commit comments

Comments
 (0)