summaryrefslogtreecommitdiff
path: root/source/libs/utils.ts
diff options
context:
space:
mode:
authorGravatar yakov116 <16872793+yakov116@users.noreply.github.com> 2020-05-19 07:51:07 -0400
committerGravatar GitHub <noreply@github.com> 2020-05-19 13:51:07 +0200
commit508c93a3f4cf219f343d19b927ae0d07ec3ad7f8 (patch)
treeacecf8f206413c0b1f7b7db3f4291489ba89788a /source/libs/utils.ts
parentdb8f46bf74ffefbbc863f011085903a226f03129 (diff)
downloadrefined-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.ts9
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};