summaryrefslogtreecommitdiff
path: root/source/features/open-ci-details-in-new-tab.tsx
blob: d5a81a065b2374d8c671dc80eee21d5b8b935216 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import select from 'select-dom';
import * as pageDetect from 'github-url-detection';

import features from '.';

function init(): void {
	const CIDetailsLinks = select.all('a.status-actions');
	for (const link of CIDetailsLinks) {
		link.setAttribute('target', '_blank');
		link.setAttribute('rel', 'noopener');
	}
}

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