Fix indentation and next.focus() -> td.focus().

This commit is contained in:
Nicolas Stepien 2012-03-06 19:53:43 +01:00
parent a1ed6c59b0
commit afcc55b2c8
2 changed files with 26 additions and 26 deletions

View File

@ -1167,11 +1167,10 @@
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;
next.focus(); td.focus();
return; return;
} }
if (!(g.REPLY || $.x('ancestor::div[@class="thread"]', next) === thread)) { if (!(g.REPLY || $.x('ancestor::div[@class="thread"]', next) === thread)) {
@ -1186,6 +1185,7 @@
next.focus(); next.focus();
return; return;
} }
}
replies = $$('.reply', thread); replies = $$('.reply', thread);
if (delta === -1) replies.reverse(); if (delta === -1) replies.reverse();
for (_i = 0, _len = replies.length; _i < _len; _i++) { for (_i = 0, _len = replies.length; _i < _len; _i++) {

View File

@ -957,7 +957,7 @@ Keybinds =
unless next unless next
td.className = 'replyhl' td.className = 'replyhl'
td.tabIndex = 0 td.tabIndex = 0
next.focus() td.focus()
return return
return unless g.REPLY or $.x('ancestor::div[@class="thread"]', next) is thread return unless g.REPLY or $.x('ancestor::div[@class="thread"]', next) is thread
rect = next.getBoundingClientRect() rect = next.getBoundingClientRect()