From e8ada75d8516c906259a16e7fc0332d2c4e8d0bc Mon Sep 17 00:00:00 2001 From: shine <4771718+shinenelson@users.noreply.github.com> Date: Thu, 29 Apr 2021 18:41:25 +0530 Subject: Drop `link-to-file-in-file-history` feature (#4296) --- source/features/link-to-file-in-file-history.tsx | 37 ------------------------ 1 file changed, 37 deletions(-) delete mode 100644 source/features/link-to-file-in-file-history.tsx (limited to 'source/features/link-to-file-in-file-history.tsx') diff --git a/source/features/link-to-file-in-file-history.tsx b/source/features/link-to-file-in-file-history.tsx deleted file mode 100644 index a7b41e71..00000000 --- a/source/features/link-to-file-in-file-history.tsx +++ /dev/null @@ -1,37 +0,0 @@ -import React from 'dom-chef'; -import select from 'select-dom'; -import {FileIcon} from '@primer/octicons-react'; -import * as pageDetect from 'github-url-detection'; - -import features from '.'; -import GitHubURL from '../github-helpers/github-url'; -import {groupSiblings} from '../github-helpers/group-buttons'; - -function init(): void | false { - const {filePath} = new GitHubURL(location.href); - if (!filePath) { - return false; - } - - for (const rootLink of select.all('a[aria-label="Browse the repository at this point in the history"]')) { - // `rootLink.pathname` points to /tree/ but GitHub automatically redirects to /blob/ when the path is of a file - rootLink.before( - - - - ); - - groupSiblings(rootLink); - } -} - -void features.add(__filebasename, { - include: [ - pageDetect.isRepoCommitList - ], - init -}); -- cgit v1.2.3