forked from AmineB/ycombinator-keys
Compare commits
3 Commits
0f0a94d993
...
9a2b786bae
Author | SHA1 | Date | |
---|---|---|---|
9a2b786bae
|
|||
d2ec8dbb62
|
|||
40a6265c53
|
@ -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 7
|
||||
// @version 6
|
||||
// @author AmineB
|
||||
// @description Ycombinator keyboard nav.
|
||||
// @downloadURL https://gitea.amine-bouabdallaoui.fr/brian6932/ycombinator-keys/raw/branch/main/keyboard-watcher.user.js
|
||||
@ -43,9 +43,7 @@ const
|
||||
query[selected].style.boxShadow = ''
|
||||
|
||||
while (selected < query.length && query[++selected].classList.contains('noshow'));
|
||||
|
||||
if (!query[selected].classList.contains('noshow'))
|
||||
highlightSelected()
|
||||
highlightSelected()
|
||||
return
|
||||
case 'k':
|
||||
if (selected <= 0)
|
||||
@ -53,9 +51,7 @@ const
|
||||
|
||||
query[selected].style.boxShadow = ''
|
||||
while (selected >= 0 && query[--selected].classList.contains('noshow'));
|
||||
|
||||
if (!query[selected].classList.contains('noshow'))
|
||||
highlightSelected()
|
||||
highlightSelected()
|
||||
return
|
||||
case 'h':
|
||||
if (globalThis.location.pathname === '/hidden')
|
||||
@ -66,8 +62,7 @@ const
|
||||
}
|
||||
else
|
||||
query[selected].nextSibling.querySelector('a.clicky.hider')?.click()
|
||||
|
||||
if (selected + 1 <= query.length && !query[selected].classList.contains('noshow'))
|
||||
if (selected + 1 <= query.length)
|
||||
highlightSelected()
|
||||
return
|
||||
case 'c':
|
||||
|
Reference in New Issue
Block a user