+ // load more network content (used for infinite scroll)
+ function loadScrollContent() {
+ if (lockLoadContent) return;
+ lockLoadContent = true;
+
+ $("#scroll-loader").fadeIn('normal');
+
+ // the page number to load is one higher than the actual
+ // page number
+ infinite_scroll.pageno+=1;
+
+ console.log('Loading page ' + infinite_scroll.pageno);
+
+ // get the raw content from the next page and insert this content
+ // right before "#conversation-end"
+ $.get('network?mode=raw' + infinite_scroll.reload_uri + '&page=' + infinite_scroll.pageno, function(data) {
+ $("#scroll-loader").hide();
+ if ($(data).length > 0) {
+ $(data).insertBefore('#conversation-end');
+ lockLoadContent = false;
+ } else {
+ $("#scroll-end").fadeIn('normal');
+ }
+ });
+ }