From 92d029f072b955344b81409cdade20ec6a25afe1 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Mon, 10 Feb 2014 11:41:25 -0500 Subject: [PATCH] removed regex removal of @first block on infinite post load in favour of DOM method --- public/src/forum/topic.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/public/src/forum/topic.js b/public/src/forum/topic.js index dde3643777..77865e651e 100644 --- a/public/src/forum/topic.js +++ b/public/src/forum/topic.js @@ -1217,15 +1217,19 @@ define(['composer', 'forum/pagination'], function(composer, pagination) { .hide() .fadeIn('slow'); + // Remove the extra post-bar that gets added + $('.posts').find('.post-bar[data-index]').each(function(idx, el) { + if (el.getAttribute('data-index')) { + el.parentNode.removeChild(el); + } + }); + onNewPostsLoaded(data.posts); }); } function parseAndTranslatePosts(data, callback) { var html = templates.prepare(templates['topic'].blocks['posts']).parse(data); - var regexp = new RegExp("([\\s\\S]*?)", 'g'); - html = html.replace(regexp, ''); - translator.translate(html, callback); }