diff options
author | 2021-04-29 18:41:25 +0530 | |
---|---|---|
committer | 2021-04-29 20:11:25 +0700 | |
commit | e8ada75d8516c906259a16e7fc0332d2c4e8d0bc (patch) | |
tree | b002e716f3a00f40ca070f817a1a768d6c75ff52 /source/features/link-to-file-in-file-history.tsx | |
parent | 5c9423120f24ea6c24f37107cdc62dd8de0d17da (diff) | |
download | refined-github-e8ada75d8516c906259a16e7fc0332d2c4e8d0bc.tar.gz refined-github-e8ada75d8516c906259a16e7fc0332d2c4e8d0bc.tar.zst refined-github-e8ada75d8516c906259a16e7fc0332d2c4e8d0bc.zip |
Drop `link-to-file-in-file-history` feature (#4296)
Diffstat (limited to 'source/features/link-to-file-in-file-history.tsx')
-rw-r--r-- | source/features/link-to-file-in-file-history.tsx | 37 |
1 files changed, 0 insertions, 37 deletions
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( - <a - href={rootLink.pathname + '/' + filePath} - className="btn btn-outline tooltipped tooltipped-sw" - aria-label="See object at this point in the history" - > - <FileIcon/> - </a> - ); - - groupSiblings(rootLink); - } -} - -void features.add(__filebasename, { - include: [ - pageDetect.isRepoCommitList - ], - init -}); |