summaryrefslogtreecommitdiff
path: root/source/features/tag-changelog-link.tsx
diff options
context:
space:
mode:
authorGravatar Fregante <opensource@bfred.it> 2020-05-08 01:42:40 +0200
committerGravatar GitHub <noreply@github.com> 2020-05-08 01:42:40 +0200
commita24d9460d36e5147f5a9f389923f2eb75f34e34f (patch)
treedb2f1253ae14d3af1c842af66c318caa760401d4 /source/features/tag-changelog-link.tsx
parent90b43ae76d84b53eb01a1d8961907c515c010994 (diff)
downloadrefined-github-a24d9460d36e5147f5a9f389923f2eb75f34e34f.tar.gz
refined-github-a24d9460d36e5147f5a9f389923f2eb75f34e34f.tar.zst
refined-github-a24d9460d36e5147f5a9f389923f2eb75f34e34f.zip
Extract page-detect.ts into `github-url-detection` (#3062)
Diffstat (limited to 'source/features/tag-changelog-link.tsx')
-rw-r--r--source/features/tag-changelog-link.tsx5
1 files changed, 2 insertions, 3 deletions
diff --git a/source/features/tag-changelog-link.tsx b/source/features/tag-changelog-link.tsx
index cce68c6a..1bff0b9f 100644
--- a/source/features/tag-changelog-link.tsx
+++ b/source/features/tag-changelog-link.tsx
@@ -1,11 +1,10 @@
import React from 'dom-chef';
import select from 'select-dom';
import DiffIcon from 'octicon/diff.svg';
+import * as pageDetect from 'github-url-detection';
import tinyVersionCompare from 'tiny-version-compare';
import features from '../libs/features';
-import * as pageDetect from '../libs/page-detect';
import fetchDom from '../libs/fetch-dom';
-import {isSingleTagPage} from '../libs/page-detect';
import {getRepoPath, getRepoURL, parseTag} from '../libs/utils';
type TagDetails = {
@@ -22,7 +21,7 @@ async function getNextPage(): Promise<DocumentFragment> {
return fetchDom(nextPageLink.href);
}
- if (isSingleTagPage()) {
+ if (pageDetect.isSingleTagPage()) {
const [, tag = ''] = getRepoPath()!.split('releases/tag/', 2); // Already URL-encoded
return fetchDom(`/${getRepoURL()}/tags?after=${tag}`);
}