Skip to content

Commit 21972a1

Browse files
yakov116fregante
andauthored
Add clone-branch feature (#2896)
Co-Authored-By: Federico Brigante <opensource@bfred.it>
1 parent dd881c1 commit 21972a1

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
@@ -307,7 +307,8 @@ export const _isRepoRoot = [
307307
'https://github.com/sindresorhus/refined-github/tree/03fa6b8b4d6e68dea9dc9bee1d197ef5d992fbd6/',
308308
'https://github.com/sindresorhus/refined-github/tree/57bf4',
309309
'https://github.com/sindresorhus/refined-github?files=1',
310-
'https://github.com/sindresorhus/refined-github/tree/master?files=1'
310+
'https://github.com/sindresorhus/refined-github/tree/master?files=1',
311+
'https://github.com/sindresorhus/branches'
311312
];
312313

313314
export const isRepoSearch = (): boolean => location.pathname.slice(1).split('/')[2] === 'search';
@@ -366,6 +367,11 @@ export const _isTrending = [
366367
'https://github.com/trending/unknown'
367368
];
368369

370+
export const isBranches = (): boolean => getRepoPath()?.startsWith('branches') ?? false;
371+
export const _isBranches = [
372+
'https://github.com/sindresorhus/refined-github/branches'
373+
];
374+
369375
export const isUserProfile = (): boolean => select.exists('.user-profile-nav');
370376
export const _isUserProfile = domBased;
371377

0 commit comments

Comments
 (0)