This commit is contained in:
Mayhem 2013-05-27 20:26:37 +02:00
parent 41b8401399
commit acd2f100c9

View File

@ -176,8 +176,11 @@ Keybinds =
rect = postEl.getBoundingClientRect()
if rect.bottom >= topMargin and rect.top <= doc.clientHeight # We're at least partially visible
root = postEl.parentNode
next = $.x 'child::div[contains(@class,"post reply")]',
if delta is +1 then root.nextElementSibling else root.previousElementSibling
axe = if delta is +1
'following'
else
'preceding'
next = $.x "#{axe}-sibling::div[contains(@class,'replyContainer')][1]/child::div[contains(@class,'reply')]", root
unless next
@focus postEl
return