From c2ba0bc7bfe8bac43b95fbb986f93444476059d3 Mon Sep 17 00:00:00 2001 From: czaks Date: Sat, 3 Aug 2013 21:59:05 -0400 Subject: [PATCH] ukko: fix thread duplication --- templates/themes/ukko/ukko.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/templates/themes/ukko/ukko.js b/templates/themes/ukko/ukko.js index 11617593..f89fa5c7 100644 --- a/templates/themes/ukko/ukko.js +++ b/templates/themes/ukko/ukko.js @@ -83,7 +83,9 @@ $(document).ready(function() { }); thread = $('div#thread_' + overflow[0].id + '[data-board="' + overflow[0].board + '"]'); - if(thread.length > 0 && thread.attr('data-cached') !== 'no') { + var existingthread = $('div#thread_' + overflow[0].id + '[data-board="' + overflow[0].board + '"][data-cached="no"]'); + + if(existingthread.length == 0 && thread.length > 0 && thread.attr('data-cached') !== 'no') { $('div[id*="thread_"]').last().after(thread.attr('data-board', overflow[0].board).attr("data-cached", "no").css('display', 'block')); boardheader.insertBefore(thread); addukkohide.call(boardheader);