summaryrefslogtreecommitdiff
path: root/source/features/hide-navigation-hover-highlight.tsx
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--source/features/hide-navigation-hover-highlight.tsx21
1 files changed, 16 insertions, 5 deletions
diff --git a/source/features/hide-navigation-hover-highlight.tsx b/source/features/hide-navigation-hover-highlight.tsx
index 792cf491..b30dc30e 100644
--- a/source/features/hide-navigation-hover-highlight.tsx
+++ b/source/features/hide-navigation-hover-highlight.tsx
@@ -1,17 +1,28 @@
import './hide-navigation-hover-highlight.css';
-import onetime from 'onetime';
import features from '../feature-manager.js';
const className = 'rgh-no-navigation-highlight';
+const html = document.documentElement;
function init(): void {
- document.documentElement.classList.add(className);
- document.documentElement.addEventListener('navigation:keydown', () => {
- document.documentElement.classList.remove(className);
+ html.classList.add(className);
+ html.addEventListener('navigation:focus', () => {
+ html.classList.remove(className);
}, {once: true});
}
void features.add(import.meta.url, {
- init: onetime(init),
+ 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
+
+*/