Compare commits

..

2 Commits

Author SHA1 Message Date
8f356c210c
Set branch-specific URIs 2025-04-19 02:11:34 -04:00
1ef520db4e
Rewrite 2025-04-19 02:11:33 -04:00

View File

@ -13,13 +13,12 @@
// ==/UserScript==
// jshint esversion: 11
let selected = -1
globalThis.document.styleSheets[0].insertRule('tbody tr.athing>td.title>span.titleline>a:focus,tbody tr.athing.comtr a.togg.clicky:focus{outline: none}')
const requery = () => globalThis.document.querySelectorAll('tbody tr.athing')
let
query = requery(),
selected = -1
let query = requery()
const
// This is a Firefox only option. For some reason older versions of Firefox can't set outline: none.
focusInvisible = { __proto__: null, focusVisible: false },
@ -62,8 +61,7 @@ const
}
else
query[selected].nextSibling.querySelector('a.clicky.hider')?.click()
if (selected + 1 <= query.length)
highlightSelected()
highlightSelected()
return
case 'c':
globalThis.open('https://news.ycombinator.com/item?id=' + query[selected].id, '_self')