blob: aac65a97d8877a8fb3a0f22a7748599f21b630c8 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
import select from 'select-dom';
import * as pageDetect from 'github-url-detection';
import features from '../libs/features';
import {getRepoURL} from '../libs/utils';
function init(): false | void {
const uploadFilesButton = select(`.file-navigation a[href^="/${getRepoURL()}/upload"]`);
if (!uploadFilesButton) {
return false;
}
uploadFilesButton.remove();
}
features.add({
id: __filebasename,
description: 'Remove the "Upload files" button',
screenshot: false
}, {
include: [
pageDetect.isRepoTree
],
repeatOnAjax: false,
init
});
|