diff options
Diffstat (limited to 'source/libs/utils.ts')
-rw-r--r-- | source/libs/utils.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/libs/utils.ts b/source/libs/utils.ts index f7d5caaa..00009233 100644 --- a/source/libs/utils.ts +++ b/source/libs/utils.ts @@ -88,6 +88,10 @@ export const getOwnerAndRepo = (): { return {ownerName, repoName}; }; +export function getForkedRepo(): string | undefined { + return select<HTMLAnchorElement>('.fork-flag a')?.pathname.slice(1); +} + export const getReference = (): string | undefined => { const pathnameParts = location.pathname.split('/'); if (['commits', 'blob', 'tree', 'blame'].includes(pathnameParts[3])) { |