From 2ae219699ca7cb020193d382b7119290ff593389 Mon Sep 17 00:00:00 2001 From: Flo Edelmann Date: Mon, 8 Jun 2020 01:28:18 +0200 Subject: Disable `remove-upload-files-button` in "Repository refresh" beta (#3194) --- source/features/remove-upload-files-button.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/features/remove-upload-files-button.tsx') diff --git a/source/features/remove-upload-files-button.tsx b/source/features/remove-upload-files-button.tsx index 01e66cf7..5196e417 100644 --- a/source/features/remove-upload-files-button.tsx +++ b/source/features/remove-upload-files-button.tsx @@ -5,7 +5,8 @@ import features from '.'; import {getRepoURL} from '../github-helpers'; function init(): void { - select(`.file-navigation a[href^="/${getRepoURL()}/upload"]`)?.remove(); + // In "Repository refresh" layout, it's part of an "Add file" dropdown, don't delete it there + select(`.file-navigation a[href^="/${getRepoURL()}/upload"]:not(.dropdown-item)`)?.remove(); } void features.add({ @@ -16,6 +17,5 @@ void features.add({ include: [ pageDetect.isRepoTree ], - repeatOnAjax: false, init }); -- cgit v1.2.3