- // add a new thread
- $('.toplevel_item',data).each(function() {
- var ident = $(this).attr('id');
-
- if ($('#' + ident).length == 0 && profile_page == 1) {
- $('img',this).each(function() {
- $(this).attr('src',$(this).attr('dst'));
- });
- $('#' + prev).after($(this));
- } else {
- // Find out if the hidden comments are open, so we can keep it that way
- // if a new comment has been posted
- var id = $('.hide-comments-total', this).attr('id');
- if (typeof id != 'undefined') {
- id = id.split('-')[3];
- var commentsOpen = $("#collapsed-comments-" + id).is(":visible");
- }
-
- $('img',this).each(function() {
- $(this).attr('src',$(this).attr('dst'));
- });
- $('html').height($('html').height());
- $('#' + ident).replaceWith($(this));