summaryrefslogtreecommitdiff
path: root/source/features/edit-files-faster.tsx
diff options
context:
space:
mode:
authorGravatar Shreshtha Misra <76113457+Shreshtha13@users.noreply.github.com> 2021-09-04 23:28:50 +0530
committerGravatar GitHub <noreply@github.com> 2021-09-05 00:58:50 +0700
commitfed373fa491b2c7c2a7f2d9dece22e5b7b403fbd (patch)
tree90c8c08b56ddcfe227dbacb32027ea5f978d95e1 /source/features/edit-files-faster.tsx
parent5bccdd68c84b95b040fb1e3a3c2f1e2f5a3f1e60 (diff)
downloadrefined-github-fed373fa491b2c7c2a7f2d9dece22e5b7b403fbd.tar.gz
refined-github-fed373fa491b2c7c2a7f2d9dece22e5b7b403fbd.tar.zst
refined-github-fed373fa491b2c7c2a7f2d9dece22e5b7b403fbd.zip
Meta: Rename fast/faster features to "quick" (#4745)
Co-authored-by: Federico Brigante <me@fregante.com>
Diffstat (limited to 'source/features/edit-files-faster.tsx')
-rw-r--r--source/features/edit-files-faster.tsx41
1 files changed, 0 insertions, 41 deletions
diff --git a/source/features/edit-files-faster.tsx b/source/features/edit-files-faster.tsx
deleted file mode 100644
index 41e21178..00000000
--- a/source/features/edit-files-faster.tsx
+++ /dev/null
@@ -1,41 +0,0 @@
-import './edit-files-faster.css';
-import React from 'dom-chef';
-import select from 'select-dom';
-import {PencilIcon} from '@primer/octicons-react';
-import * as pageDetect from 'github-url-detection';
-
-import {wrap} from '../helpers/dom-utils';
-import features from '.';
-import GitHubURL from '../github-helpers/github-url';
-import {isPermalink} from '../github-helpers';
-import getDefaultBranch from '../github-helpers/get-default-branch';
-import onFileListUpdate from '../github-events/on-file-list-update';
-
-async function init(): Promise<void> {
- const isPermalink_ = await isPermalink();
- for (const fileIcon of select.all('.js-navigation-container .octicon-file')) {
- const fileLink = fileIcon.closest('.js-navigation-item')!.querySelector('a.js-navigation-open')!;
- const url = new GitHubURL(fileLink.href).assign({
- route: 'edit',
- });
-
- if (isPermalink_) {
- // eslint-disable-next-line no-await-in-loop
- url.branch = await getDefaultBranch(); // Permalinks can't be edited
- }
-
- wrap(fileIcon, <a href={String(url)} className="rgh-edit-files-faster"/>);
- fileIcon.after(<PencilIcon/>);
- }
-}
-
-void features.add(__filebasename, {
- include: [
- pageDetect.isRepoTree,
- ],
- additionalListeners: [
- onFileListUpdate,
- ],
- deduplicate: '.rgh-edit-files-faster', // #3945
- init,
-});