Skip to content

Commit 90a5636

Browse files
yakov116fregante
andauthored
Add discussion-links-on-repo-lists feature (#2981)
Co-Authored-By: Federico Brigante <opensource@bfred.it>
1 parent a4a01db commit 90a5636

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

source/index.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ export const _isDashboard = [
6767
'https://github.com/orgs/edit/dashboard',
6868
'https://github.big-corp.com/',
6969
'https://not-github.com/',
70-
'https://my-little-hub.com/'
70+
'https://my-little-hub.com/',
71+
'https://github.com/?tab=repositories' // Gotcha for `isUserProfileRepoTab`
7172
];
7273

7374
export const isEnterprise = (): boolean => location.hostname !== 'github.com' && location.hostname !== 'gist.github.com';
@@ -373,6 +374,11 @@ export const _isBranches = [
373374
export const isUserProfile = (): boolean => select.exists('.user-profile-nav');
374375
export const _isUserProfile = domBased;
375376

377+
export const isUserProfileRepoTab = (): boolean =>
378+
isUserProfile() &&
379+
new URLSearchParams(location.search).get('tab') === 'repositories';
380+
export const _isUserProfileRepoTab = domBased;
381+
376382
export const isSingleTagPage = (): boolean => /^(releases\/tag)/.test(getRepoPath()!);
377383
export const _isSingleTagPage = [
378384
'https://github.com/sindresorhus/refined-github/releases/tag/v1.0.0-beta.4',

0 commit comments

Comments
 (0)