Fix indentation and next.focus() -> td.focus().
This commit is contained in:
parent
a1ed6c59b0
commit
afcc55b2c8
@ -1167,24 +1167,24 @@
|
|||||||
rect = td.getBoundingClientRect();
|
rect = td.getBoundingClientRect();
|
||||||
if (rect.bottom >= 0 && rect.top <= d.body.clientHeight) {
|
if (rect.bottom >= 0 && rect.top <= d.body.clientHeight) {
|
||||||
next = delta === +1 ? $.x('following::td[@class="reply"]', td) : $.x('preceding::td[@class="reply"]', td);
|
next = delta === +1 ? $.x('following::td[@class="reply"]', td) : $.x('preceding::td[@class="reply"]', td);
|
||||||
}
|
if (!next) {
|
||||||
if (!next) {
|
td.className = 'replyhl';
|
||||||
td.className = 'replyhl';
|
td.tabIndex = 0;
|
||||||
td.tabIndex = 0;
|
td.focus();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!(g.REPLY || $.x('ancestor::div[@class="thread"]', next) === thread)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
rect = next.getBoundingClientRect();
|
||||||
|
if (rect.top < 0 || rect.bottom > d.body.clientHeight) {
|
||||||
|
next.scrollIntoView(delta === -1);
|
||||||
|
}
|
||||||
|
next.className = 'replyhl';
|
||||||
|
next.tabIndex = 0;
|
||||||
next.focus();
|
next.focus();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!(g.REPLY || $.x('ancestor::div[@class="thread"]', next) === thread)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
rect = next.getBoundingClientRect();
|
|
||||||
if (rect.top < 0 || rect.bottom > d.body.clientHeight) {
|
|
||||||
next.scrollIntoView(delta === -1);
|
|
||||||
}
|
|
||||||
next.className = 'replyhl';
|
|
||||||
next.tabIndex = 0;
|
|
||||||
next.focus();
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
replies = $$('.reply', thread);
|
replies = $$('.reply', thread);
|
||||||
if (delta === -1) replies.reverse();
|
if (delta === -1) replies.reverse();
|
||||||
|
|||||||
@ -954,19 +954,19 @@ Keybinds =
|
|||||||
$.x 'following::td[@class="reply"]', td
|
$.x 'following::td[@class="reply"]', td
|
||||||
else
|
else
|
||||||
$.x 'preceding::td[@class="reply"]', td
|
$.x 'preceding::td[@class="reply"]', td
|
||||||
unless next
|
unless next
|
||||||
td.className = 'replyhl'
|
td.className = 'replyhl'
|
||||||
td.tabIndex = 0
|
td.tabIndex = 0
|
||||||
|
td.focus()
|
||||||
|
return
|
||||||
|
return unless g.REPLY or $.x('ancestor::div[@class="thread"]', next) is thread
|
||||||
|
rect = next.getBoundingClientRect()
|
||||||
|
if rect.top < 0 or rect.bottom > d.body.clientHeight
|
||||||
|
next.scrollIntoView delta is -1
|
||||||
|
next.className = 'replyhl'
|
||||||
|
next.tabIndex = 0
|
||||||
next.focus()
|
next.focus()
|
||||||
return
|
return
|
||||||
return unless g.REPLY or $.x('ancestor::div[@class="thread"]', next) is thread
|
|
||||||
rect = next.getBoundingClientRect()
|
|
||||||
if rect.top < 0 or rect.bottom > d.body.clientHeight
|
|
||||||
next.scrollIntoView delta is -1
|
|
||||||
next.className = 'replyhl'
|
|
||||||
next.tabIndex = 0
|
|
||||||
next.focus()
|
|
||||||
return
|
|
||||||
|
|
||||||
replies = $$ '.reply', thread
|
replies = $$ '.reply', thread
|
||||||
replies.reverse() if delta is -1
|
replies.reverse() if delta is -1
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user