diff options
author | 2020-05-19 07:51:07 -0400 | |
---|---|---|
committer | 2020-05-19 13:51:07 +0200 | |
commit | 508c93a3f4cf219f343d19b927ae0d07ec3ad7f8 (patch) | |
tree | acecf8f206413c0b1f7b7db3f4291489ba89788a /source/libs/utils.ts | |
parent | db8f46bf74ffefbbc863f011085903a226f03129 (diff) | |
download | refined-github-508c93a3f4cf219f343d19b927ae0d07ec3ad7f8.tar.gz refined-github-508c93a3f4cf219f343d19b927ae0d07ec3ad7f8.tar.zst refined-github-508c93a3f4cf219f343d19b927ae0d07ec3ad7f8.zip |
Ensure features work on branches/tags with slashes (#3083)20.5.19
Diffstat (limited to 'source/libs/utils.ts')
-rw-r--r-- | source/libs/utils.ts | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/source/libs/utils.ts b/source/libs/utils.ts index 58eb2368..6ba75dd6 100644 --- a/source/libs/utils.ts +++ b/source/libs/utils.ts @@ -106,15 +106,6 @@ 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])) { - return pathnameParts[4]; - } - - return undefined; -}; - export const parseTag = (tag: string): {version: string; namespace: string} => { const [, namespace = '', version = ''] = /(?:(.*)@)?([^@]+)/.exec(tag) ?? []; return {namespace, version}; |