Compare commits

..

3 Commits

Author SHA1 Message Date
da49811d97 Bump ver 2025-05-16 00:52:58 -04:00
ea50ee325e Set branch-specific URIs 2025-05-16 00:52:19 -04:00
c5285f2461 Rewrite 2025-05-16 00:52:15 -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 10
// @version 9
// @author AmineB
// @description Ycombinator keyboard nav.
// @downloadURL https://gitea.amine-bouabdallaoui.fr/brian6932/ycombinator-keys/raw/branch/main/keyboard-watcher.user.js
@ -21,9 +21,6 @@ let
selected = -1,
lastCollapsed
const
input = new Set()
.add('INPUT')
.add('TEXTAREA'),
// This is a Firefox only option. For some reason older versions of Firefox can't set outline: none.
focusInvisible = { __proto__: null, focusVisible: false },
isComment = () => query[selected].classList.contains('comtr'),
@ -38,8 +35,6 @@ const
query[selected].lastChild.firstChild.firstChild.focus(focusInvisible)
},
keydown = event => {
if (input.has(globalThis.document.activeElement.tagName))
return
switch (event.key) {
case 'j':
const lastIndex = query.length - 1