summaryrefslogtreecommitdiff
path: root/source/libs/page-detect.ts
diff options
context:
space:
mode:
Diffstat (limited to 'source/libs/page-detect.ts')
-rw-r--r--source/libs/page-detect.ts8
1 files changed, 7 insertions, 1 deletions
diff --git a/source/libs/page-detect.ts b/source/libs/page-detect.ts
index 8dbe9a73..2c48d300 100644
--- a/source/libs/page-detect.ts
+++ b/source/libs/page-detect.ts
@@ -67,7 +67,8 @@ export const _isDashboard = [
'https://github.com/orgs/edit/dashboard',
'https://github.big-corp.com/',
'https://not-github.com/',
- 'https://my-little-hub.com/'
+ 'https://my-little-hub.com/',
+ 'https://github.com/?tab=repositories' // Gotcha for `isUserProfileRepoTab`
];
export const isEnterprise = (): boolean => location.hostname !== 'github.com' && location.hostname !== 'gist.github.com';
@@ -373,6 +374,11 @@ export const _isBranches = [
export const isUserProfile = (): boolean => select.exists('.user-profile-nav');
export const _isUserProfile = domBased;
+export const isUserProfileRepoTab = (): boolean =>
+ isUserProfile() &&
+ new URLSearchParams(location.search).get('tab') === 'repositories';
+export const _isUserProfileRepoTab = domBased;
+
export const isSingleTagPage = (): boolean => /^(releases\/tag)/.test(getRepoPath()!);
export const _isSingleTagPage = [
'https://github.com/sindresorhus/refined-github/releases/tag/v1.0.0-beta.4',