diff options
Diffstat (limited to 'view/js/main.js')
-rw-r--r-- | view/js/main.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/view/js/main.js b/view/js/main.js index 65a5311af..0239fc1f8 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -652,14 +652,16 @@ function updateConvItems(mode,data) { } // auto-scroll to a particular comment in a thread (designated by mid) when in single-thread mode - if($('.item_' + bParam_mid.substring(0,32)).length && mode == 'replace') { - $('html, body').animate({ scrollTop: $('.item_' + bParam_mid.substring(0,32)).offset().top - $('nav').outerHeight(true) }, 'slow'); + if($('.item_' + bParam_mid.substring(0,32)).length && !$('.item_' + bParam_mid.substring(0,32)).hasClass('toplevel_item') && mode == 'replace') { if($('.collapsed-comments').length) { var scrolltoid = $('.collapsed-comments').attr('id').substring(19); - $('#collapsed-comments-' + scrolltoid).slideDown(); + $('#collapsed-comments-' + scrolltoid + ' .autotime').timeago(); + $('#collapsed-comments-' + scrolltoid).show(); $('#hide-comments-' + scrolltoid).html(aStr.showfewer); $('#hide-comments-total-' + scrolltoid).hide(); } + $('html, body').animate({ scrollTop: $('.item_' + bParam_mid.substring(0,32)).offset().top - $('nav').outerHeight() }, 'slow'); + $('.item_' + bParam_mid.substring(0,32)).addClass('item-highlight'); } } |