We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
isFork
1 parent abee5e1 commit 78a01f9Copy full SHA for 78a01f9
index.ts
@@ -614,6 +614,11 @@ TEST: addTests('isRepoNetworkGraph', [
614
615
export const isForkedRepo = (): boolean => exists('meta[name="octolytics-dimension-repository_is_fork"][content="true"]');
616
617
+export const isFork = (url: URL | HTMLAnchorElement | Location = location): boolean => getRepo(url)?.path === 'fork';
618
+TEST: addTests('isFork', [
619
+ 'https://github.com/refined-github/refined-github/fork',
620
+]);
621
+
622
export const isSingleGist = (url: URL | HTMLAnchorElement | Location = location): boolean => /^[^/]+\/[\da-f]{20,32}(\/[\da-f]{40})?$/.test(getCleanGistPathname(url));
623
TEST: addTests('isSingleGist', [
624
'https://gist.github.com/fregante/2205329b71218fa2c1d3',
0 commit comments