forked from AmineB/ycombinator-keys
Compare commits
3 Commits
901cbff919
...
f6e7ba18a2
Author | SHA1 | Date | |
---|---|---|---|
f6e7ba18a2 | |||
5d005dc60d | |||
1d80653091 |
@ -5,7 +5,7 @@
|
|||||||
// @match http*://news.ycombinator.com/*
|
// @match http*://news.ycombinator.com/*
|
||||||
// @icon https://gitea.amine-bouabdallaoui.fr/AmineB/ycombinator-keys/raw/branch/main/icons/48.png
|
// @icon https://gitea.amine-bouabdallaoui.fr/AmineB/ycombinator-keys/raw/branch/main/icons/48.png
|
||||||
// @grant none
|
// @grant none
|
||||||
// @version 4
|
// @version 5
|
||||||
// @author AmineB
|
// @author AmineB
|
||||||
// @description Ycombinator keyboard nav.
|
// @description Ycombinator keyboard nav.
|
||||||
// @downloadURL https://gitea.amine-bouabdallaoui.fr/brian6932/ycombinator-keys/raw/branch/main/keyboard-watcher.user.js
|
// @downloadURL https://gitea.amine-bouabdallaoui.fr/brian6932/ycombinator-keys/raw/branch/main/keyboard-watcher.user.js
|
||||||
@ -71,6 +71,16 @@ const
|
|||||||
case 'C':
|
case 'C':
|
||||||
globalThis.open('https://news.ycombinator.com/item?id=' + query[selected].id)
|
globalThis.open('https://news.ycombinator.com/item?id=' + query[selected].id)
|
||||||
return
|
return
|
||||||
|
case 'r':
|
||||||
|
if (!isComment())
|
||||||
|
return
|
||||||
|
globalThis.open(query[selected].querySelector('.reply a').href, '_self')
|
||||||
|
return
|
||||||
|
case 'R':
|
||||||
|
if (!isComment())
|
||||||
|
return
|
||||||
|
globalThis.open(query[selected].querySelector('.reply a').href)
|
||||||
|
return
|
||||||
case 'u':
|
case 'u':
|
||||||
globalThis.open((isComment() ? query[selected] : query[selected].nextSibling).querySelector('a.hnuser').href, '_self')
|
globalThis.open((isComment() ? query[selected] : query[selected].nextSibling).querySelector('a.hnuser').href, '_self')
|
||||||
return
|
return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user