forked from AmineB/ycombinator-keys
Compare commits
3 Commits
e04ab7aacc
...
27e1c54451
Author | SHA1 | Date | |
---|---|---|---|
27e1c54451
|
|||
3e431c552b
|
|||
86026e4839
|
@ -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 10
|
||||
// @version 11
|
||||
// @author AmineB
|
||||
// @description Ycombinator keyboard nav.
|
||||
// @downloadURL https://gitea.amine-bouabdallaoui.fr/brian6932/ycombinator-keys/raw/branch/main/keyboard-watcher.user.js
|
||||
@ -38,8 +38,7 @@ const
|
||||
query[selected].lastChild.firstChild.firstChild.focus(focusInvisible)
|
||||
},
|
||||
keydown = event => {
|
||||
if (input.has(globalThis.document.activeElement.tagName))
|
||||
return
|
||||
if (!input.has(event.target.tagName))
|
||||
switch (event.key) {
|
||||
case 'j':
|
||||
const lastIndex = query.length - 1
|
||||
|
Reference in New Issue
Block a user