summaryrefslogtreecommitdiff
path: root/source/features/hide-navigation-hover-highlight.tsx
blob: f67cc100795674ff44c43e254e2a1e51bcdd770d (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
26
27
28
import './hide-navigation-hover-highlight.css';

import features from '../feature-manager.js';

const attribute = 'rgh-no-navigation-highlight';
const html = document.documentElement;

function init(): void {
	html.setAttribute(attribute, '');
	html.addEventListener('navigation:focus', () => {
		html.removeAttribute(attribute);
	}, {once: true});
}

void features.add(import.meta.url, {
	init,
});

/*

Test URLs

- Notifications list: https://github.com/notifications
- Issue list: https://github.com/refined-github/refined-github/issues
- React file list: https://github.com/refined-github/refined-github/tree/main/.github
- File list: https://github.com/refined-github/refined-github

*/