From a24d9460d36e5147f5a9f389923f2eb75f34e34f Mon Sep 17 00:00:00 2001 From: Fregante Date: Fri, 8 May 2020 01:42:40 +0200 Subject: Extract page-detect.ts into `github-url-detection` (#3062) --- source/features/patch-diff-links.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'source/features/patch-diff-links.tsx') diff --git a/source/features/patch-diff-links.tsx b/source/features/patch-diff-links.tsx index c82618cd..4771be49 100644 --- a/source/features/patch-diff-links.tsx +++ b/source/features/patch-diff-links.tsx @@ -1,14 +1,13 @@ import './patch-diff-links.css'; import React from 'dom-chef'; import select from 'select-dom'; +import * as pageDetect from 'github-url-detection'; import features from '../libs/features'; -import * as pageDetect from '../libs/page-detect'; -import {isPRCommit} from '../libs/page-detect'; function init(): void { let commitUrl = location.pathname.replace(/\/$/, ''); - if (isPRCommit()) { + if (pageDetect.isPRCommit()) { commitUrl = commitUrl.replace(/\/pull\/\d+\/commits/, '/commit'); } -- cgit v1.2.3