|
|
|
@ -144,7 +144,6 @@ function mark_read(active, only_not_read) { |
|
|
|
|
inc = 0; |
|
|
|
|
if (active.hasClass("not_read")) { |
|
|
|
|
active.removeClass("not_read"); |
|
|
|
|
hide_article(active); |
|
|
|
|
inc--; |
|
|
|
|
} else if (only_not_read !== true || active.hasClass("not_read")) { |
|
|
|
|
active.addClass("not_read"); |
|
|
|
@ -232,7 +231,14 @@ function toggleContent(new_active, old_active) { |
|
|
|
|
} |
|
|
|
|
old_active.removeClass("active current"); |
|
|
|
|
new_active.addClass("current"); |
|
|
|
|
hide_article(old_active); |
|
|
|
|
if (context['auto_remove_article'] && !old_active.hasClass('not_read')) { |
|
|
|
|
var p = old_active.prev(); |
|
|
|
|
var n = old_active.next(); |
|
|
|
|
if (p.hasClass('day') && n.hasClass('day')) { |
|
|
|
|
p.remove(); |
|
|
|
|
} |
|
|
|
|
old_active.remove(); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
new_active.toggleClass('active'); |
|
|
|
|
} |
|
|
|
@ -277,17 +283,6 @@ function toggleContent(new_active, old_active) { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function hide_article(article) { |
|
|
|
|
if (context['auto_remove_article'] && !article.hasClass('not_read')) { |
|
|
|
|
var p = article.prev(); |
|
|
|
|
var n = article.next(); |
|
|
|
|
if (p.hasClass('day') && n.hasClass('day')) { |
|
|
|
|
p.remove(); |
|
|
|
|
} |
|
|
|
|
article.remove(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function prev_entry() { |
|
|
|
|
var old_active = $(".flux.current"), |
|
|
|
|
new_active = old_active.length === 0 ? $(".flux:last") : old_active.prevAll(".flux:first"); |
|
|
|
@ -695,6 +690,9 @@ function init_stream(divStream) { |
|
|
|
|
divStream.on('click', '.flux a.read', function () { |
|
|
|
|
var active = $(this).parents(".flux"); |
|
|
|
|
mark_read(active, false); |
|
|
|
|
if (context['auto_remove_article']) { |
|
|
|
|
active.remove(); |
|
|
|
|
} |
|
|
|
|
return false; |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|