blob: 5196e4173946f8daa32a48d46cfa763fb510522b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
import select from 'select-dom';
import * as pageDetect from 'github-url-detection';
import features from '.';
import {getRepoURL} from '../github-helpers';
function init(): void {
// 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({
id: __filebasename,
description: 'Remove the "Upload files" button',
screenshot: false
}, {
include: [
pageDetect.isRepoTree
],
init
});
|