aboutsummaryrefslogtreecommitdiffstats
path: root/view/js/main.js
diff options
context:
space:
mode:
Diffstat (limited to 'view/js/main.js')
-rw-r--r--view/js/main.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/view/js/main.js b/view/js/main.js
index f415637bd..b5bbd57b5 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -250,6 +250,7 @@ var last_filestorage_id = null;
var mediaPlaying = false;
var contentHeightDiff = 0;
+
$(function() {
$.ajaxSetup({cache: false});
@@ -650,6 +651,17 @@ function updateConvItems(mode,data) {
collapseHeight();
}
+ // auto-scroll to a particular comment in a thread (designated by mid) when in single-thread mode
+ if(bParam_mid && mode == 'replace') {
+ $('html, body').animate({ scrollTop: $('.item_' + bParam_mid.substring(0,32)).offset().top }, 'slow');
+ if($('.collapsed-comments').length) {
+ var scrolltoid = $('.collapsed-comments').attr('id').substring(19);
+ $('#collapsed-comments-' + scrolltoid).slideDown();
+ $('#hide-comments-' + scrolltoid).html(aStr.showfewer);
+ $('#hide-comments-total-' + scrolltoid).hide();
+ }
+ }
+
}
function collapseHeight() {