Compare commits

..

3 Commits

Author SHA1 Message Date
0f0a94d993
Bump ver 2025-05-15 22:31:30 -04:00
3ee61aa074
Set branch-specific URIs 2025-05-15 22:30:54 -04:00
6cc8a1a877
Rewrite 2025-05-15 22:30:46 -04:00

View File

@ -5,7 +5,7 @@
// @match *://news.ycombinator.com/*
// @icon https://gitea.amine-bouabdallaoui.fr/AmineB/ycombinator-keys/raw/branch/main/icons/48.png
// @grant none
// @version 6
// @version 7
// @author AmineB
// @description Ycombinator keyboard nav.
// @downloadURL https://gitea.amine-bouabdallaoui.fr/brian6932/ycombinator-keys/raw/branch/main/keyboard-watcher.user.js
@ -43,7 +43,9 @@ const
query[selected].style.boxShadow = ''
while (selected < query.length && query[++selected].classList.contains('noshow'));
highlightSelected()
if (!query[selected].classList.contains('noshow'))
highlightSelected()
return
case 'k':
if (selected <= 0)
@ -51,7 +53,9 @@ const
query[selected].style.boxShadow = ''
while (selected >= 0 && query[--selected].classList.contains('noshow'));
highlightSelected()
if (!query[selected].classList.contains('noshow'))
highlightSelected()
return
case 'h':
if (globalThis.location.pathname === '/hidden')
@ -62,7 +66,8 @@ const
}
else
query[selected].nextSibling.querySelector('a.clicky.hider')?.click()
if (selected + 1 <= query.length)
if (selected + 1 <= query.length && !query[selected].classList.contains('noshow'))
highlightSelected()
return
case 'c':