summaryrefslogtreecommitdiff
path: root/source/features/linkify-notification-repository-header.tsx
blob: c58b3d41d11805e0ede9d9a3314e4aed3f2912cc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import React from 'dom-chef';
import select from 'select-dom';
import * as pageDetect from 'github-url-detection';

import features from '.';

function init(): void {
	for (const header of select.all('.js-notifications-group h6')) {
		header.append(
			<a className="text-inherit" href={'/' + header.textContent!.trim()}>
				{header.firstChild}
			</a>
		);
	}
}

void features.add(__filebasename, {
	include: [
		pageDetect.isNotifications
	],
	init
});