Compare commits
1 Commits
b8e6306c01
...
8ec6a30a82
Author | SHA1 | Date | |
---|---|---|---|
8ec6a30a82 |
@ -13,12 +13,13 @@
|
|||||||
// ==/UserScript==
|
// ==/UserScript==
|
||||||
// jshint esversion: 11
|
// 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}')
|
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')
|
const requery = () => globalThis.document.querySelectorAll('tbody tr.athing')
|
||||||
let query = requery()
|
let
|
||||||
|
query = requery(),
|
||||||
|
selected = -1
|
||||||
const
|
const
|
||||||
// This is a Firefox only option. For some reason older versions of Firefox can't set outline: none.
|
// This is a Firefox only option. For some reason older versions of Firefox can't set outline: none.
|
||||||
focusInvisible = { __proto__: null, focusVisible: false },
|
focusInvisible = { __proto__: null, focusVisible: false },
|
||||||
@ -61,7 +62,8 @@ const
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
query[selected].nextSibling.querySelector('a.clicky.hider')?.click()
|
query[selected].nextSibling.querySelector('a.clicky.hider')?.click()
|
||||||
highlightSelected()
|
if (selected + 1 <= query.length)
|
||||||
|
highlightSelected()
|
||||||
return
|
return
|
||||||
case 'c':
|
case 'c':
|
||||||
globalThis.open('https://news.ycombinator.com/item?id=' + query[selected].id, '_self')
|
globalThis.open('https://news.ycombinator.com/item?id=' + query[selected].id, '_self')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user