ukko: fix thread duplication

This commit is contained in:
czaks 2013-08-03 21:59:05 -04:00
parent 1f5ce14f59
commit c2ba0bc7bf

View File

@ -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);