ukko: bugfixes
This commit is contained in:
parent
73b5cf5a08
commit
3922677968
@ -35,12 +35,12 @@ $(document).ready(function() {
|
||||
ukkohide.click(function() {
|
||||
hiddenboards[board] = (hiddenboards[board] !== true);
|
||||
if (hiddenboards[board] !== true) {
|
||||
$('[data-board="'+board+'"][data-cached!="yes"]').show().prev().
|
||||
$('[data-board="'+board+'"]:not([data-cached="yes"])').show().prev().
|
||||
find('.ukkohide').html(_("(hide threads from this board)")).
|
||||
parent().find('hr').hide();
|
||||
}
|
||||
else {
|
||||
$('[data-board="'+board+'"][data-cached!="yes"]').hide().prev().
|
||||
$('[data-board="'+board+'"]:not([data-cached="yes"])').hide().prev().
|
||||
find('.ukkohide').html(_("(show threads from this board)"))
|
||||
.parent().find('hr').show();
|
||||
}
|
||||
@ -59,7 +59,7 @@ $(document).ready(function() {
|
||||
while($(window).scrollTop() + $(window).height() + 500 > $(document).height() && !loading && overflow.length > 0) {
|
||||
var page = '../' + overflow[0].board + '/' + overflow[0].page;
|
||||
thread = $('div#thread_' + overflow[0].id + '[data-board="' + overflow[0].board + '"]');
|
||||
if (thread.length > 0 && thread.data("cached") !== 'yes') { // already present
|
||||
if (thread.length > 0 && thread.attr("data-cached") !== 'yes') { // already present
|
||||
overflow.shift();
|
||||
continue;
|
||||
}
|
||||
@ -67,7 +67,7 @@ $(document).ready(function() {
|
||||
var boardheader = $('<h2><a href="/' + overflow[0].board + '/">/' + overflow[0].board + '/</a> </h2>');
|
||||
|
||||
if($.inArray(page, cache) != -1 && thread.length > 0) {
|
||||
$('div[id*="thread_"]').last().after(thread.attr('data-board', overflow[0].board).data("cached", "no").css('display', 'block'));
|
||||
$('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);
|
||||
$(document).trigger('new_post', thread);
|
||||
@ -79,12 +79,12 @@ $(document).ready(function() {
|
||||
cache.push(page);
|
||||
|
||||
$(data).find('div[id*="thread_"]').each(function() {
|
||||
$('form[name="postcontrols"]').prepend($(this).css('display', 'none').data("cached", "yes").attr('data-board', overflow[0].board));
|
||||
$('form[name="postcontrols"]').prepend($(this).css('display', 'none').attr("data-cached", "yes").attr('data-board', overflow[0].board));
|
||||
});
|
||||
|
||||
thread = $('div#thread_' + overflow[0].id + '[data-board="' + overflow[0].board + '"]');
|
||||
if(thread.length > 0 && thread.data('cached') !== 'no') {
|
||||
$('div[id*="thread_"]').last().after(thread.attr('data-board', overflow[0].board).data("cached", "no").css('display', 'block'));
|
||||
if(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);
|
||||
$(document).trigger('new_post', thread);
|
||||
|
Loading…
Reference in New Issue
Block a user