forked from AmineB/ycombinator-keys
Compare commits
2 Commits
bc46321b88
...
8f356c210c
Author | SHA1 | Date | |
---|---|---|---|
8f356c210c | |||
1ef520db4e |
@ -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')
|
||||
|
Loading…
x
Reference in New Issue
Block a user