diff options
author | 2020-05-08 01:42:40 +0200 | |
---|---|---|
committer | 2020-05-08 01:42:40 +0200 | |
commit | a24d9460d36e5147f5a9f389923f2eb75f34e34f (patch) | |
tree | db2f1253ae14d3af1c842af66c318caa760401d4 /source/features/show-open-prs-of-forks.tsx | |
parent | 90b43ae76d84b53eb01a1d8961907c515c010994 (diff) | |
download | refined-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/show-open-prs-of-forks.tsx')
-rw-r--r-- | source/features/show-open-prs-of-forks.tsx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/source/features/show-open-prs-of-forks.tsx b/source/features/show-open-prs-of-forks.tsx index 9cd656f9..beb0d466 100644 --- a/source/features/show-open-prs-of-forks.tsx +++ b/source/features/show-open-prs-of-forks.tsx @@ -2,10 +2,9 @@ import React from 'dom-chef'; import cache from 'webext-storage-cache'; import select from 'select-dom'; import elementReady from 'element-ready'; +import * as pageDetect from 'github-url-detection'; import * as api from '../libs/api'; import features from '../libs/features'; -import * as pageDetect from '../libs/page-detect'; -import {isForkedRepo, isRepoWithAccess} from '../libs/page-detect'; import {getForkedRepo, getUsername, pluralize} from '../libs/utils'; function getLinkCopy(count: number): string { @@ -43,7 +42,7 @@ const countPRs = cache.function(async (forkedRepo: string): Promise<[number, num async function getPRs(): Promise<[number, string] | []> { await elementReady('.repohead + *'); // Wait for the tab bar to be loaded - if (!isRepoWithAccess()) { + if (!pageDetect.isRepoWithAccess()) { return []; } @@ -89,7 +88,7 @@ features.add({ pageDetect.isRepo ], exclude: [ - () => !isForkedRepo() + () => !pageDetect.isForkedRepo() ], waitForDomReady: false, init: initHeadHint @@ -98,7 +97,7 @@ features.add({ pageDetect.isRepoSettings ], exclude: [ - () => !isForkedRepo() + () => !pageDetect.isForkedRepo() ], waitForDomReady: false, init: initDeleteHint |