Skip to content

Commit e0fc47f

Browse files
jeronefregante
authored andcommitted
Add minimize-upload-bar feature (#2157)
1 parent 9ed3f6a commit e0fc47f

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

source/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ export const isMilestoneList = (): boolean => getRepoPath() === 'milestones';
4141

4242
export const isNewIssue = (): boolean => /^issues\/new/.test(getRepoPath()!);
4343

44+
export const isNewRelease = (): boolean => /^releases\/new/.test(getRepoPath()!);
45+
4446
export const isNotifications = (): boolean => /^([^/]+[/][^/]+\/)?notifications/.test(getCleanPathname());
4547

4648
export const isOrganizationProfile = (): boolean => select.exists('.orghead');

test.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,9 +203,19 @@ test('isMilestone', urlMatcherMacro, pageDetect.isMilestone, [
203203
test('isNewIssue', urlMatcherMacro, pageDetect.isNewIssue, [
204204
'https://github.com/sindresorhus/refined-github/issues/new'
205205
], [
206-
'http://github.com/sindresorhus/ava',
206+
'http://github.com/issues/new',
207207
'https://github.com',
208-
'https://github.com/sindresorhus/refined-github/issues'
208+
'https://github.com/sindresorhus/refined-github/issues',
209+
'https://github.com/sindresorhus/refined-github/blob/issues/new'
210+
]);
211+
212+
test('isNewRelease', urlMatcherMacro, pageDetect.isNewRelease, [
213+
'https://github.com/sindresorhus/refined-github/releases/new'
214+
], [
215+
'http://github.com/releases/new',
216+
'https://github.com',
217+
'https://github.com/sindresorhus/refined-github/releases',
218+
'https://github.com/sindresorhus/refined-github/blob/releases/new'
209219
]);
210220

211221
test('isNotifications', urlMatcherMacro, pageDetect.isNotifications, [

0 commit comments

Comments
 (0)