axe -> axis
This commit is contained in:
parent
6441852793
commit
e22aa713b3
@ -193,11 +193,11 @@ Keybinds =
|
|||||||
{height} = postEl.getBoundingClientRect()
|
{height} = postEl.getBoundingClientRect()
|
||||||
if Header.getTopOf(postEl) >= -height and Header.getBottomOf(postEl) >= -height # We're at least partially visible
|
if Header.getTopOf(postEl) >= -height and Header.getBottomOf(postEl) >= -height # We're at least partially visible
|
||||||
root = postEl.parentNode
|
root = postEl.parentNode
|
||||||
axe = if delta is +1
|
axis = if delta is +1
|
||||||
'following'
|
'following'
|
||||||
else
|
else
|
||||||
'preceding'
|
'preceding'
|
||||||
return unless next = $.x "#{axe}-sibling::div[contains(@class,'replyContainer') and not(@hidden) and not(child::div[@class='stub'])][1]/child::div[contains(@class,'reply')]", root
|
return unless next = $.x "#{axis}-sibling::div[contains(@class,'replyContainer') and not(@hidden) and not(child::div[@class='stub'])][1]/child::div[contains(@class,'reply')]", root
|
||||||
Header.scrollToIfNeeded next, delta is +1
|
Header.scrollToIfNeeded next, delta is +1
|
||||||
@focus next
|
@focus next
|
||||||
$.rmClass postEl, 'highlight'
|
$.rmClass postEl, 'highlight'
|
||||||
|
|||||||
@ -48,11 +48,11 @@ Nav =
|
|||||||
|
|
||||||
scroll: (delta) ->
|
scroll: (delta) ->
|
||||||
thread = Nav.getThread()
|
thread = Nav.getThread()
|
||||||
axe = if delta is +1
|
axis = if delta is +1
|
||||||
'following'
|
'following'
|
||||||
else
|
else
|
||||||
'preceding'
|
'preceding'
|
||||||
if next = $.x "#{axe}-sibling::div[contains(@class,'thread') and not(@hidden)][1]", thread
|
if next = $.x "#{axis}-sibling::div[contains(@class,'thread') and not(@hidden)][1]", thread
|
||||||
# Unless we're not at the beginning of the current thread,
|
# Unless we're not at the beginning of the current thread,
|
||||||
# and thus wanting to move to beginning,
|
# and thus wanting to move to beginning,
|
||||||
# or we're above the first thread and don't want to skip it.
|
# or we're above the first thread and don't want to skip it.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user