summaryrefslogtreecommitdiff
path: root/source/features/hide-empty-meta.tsx
blob: ecc7bdc4b643aad29b6d43a629b6f4511066677d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import select from 'select-dom';
import features from '../libs/features';

function init() {
	const meta = select<HTMLElement>('.repository-meta');
	if (select.exists('em', meta) && !select.exists('.js-edit-repo-meta-button')) {
		meta.style.display = 'none';
	}
}

features.add({
	id: 'hide-empty-meta',
	include: [
		features.isRepoRoot
	],
	load: features.onAjaxedPages,
	init
});