Shift-click to hide threads in catalog
This commit is contained in:
parent
01207dfcbb
commit
e8b530a783
@ -1,5 +1,4 @@
|
|||||||
if (active_page == 'catalog') $(function(){
|
if (active_page == 'catalog') $(function(){
|
||||||
|
|
||||||
if (localStorage.catalog !== undefined) {
|
if (localStorage.catalog !== undefined) {
|
||||||
var catalog = JSON.parse(localStorage.catalog);
|
var catalog = JSON.parse(localStorage.catalog);
|
||||||
} else {
|
} else {
|
||||||
@ -15,8 +14,18 @@ if (active_page == 'catalog') $(function(){
|
|||||||
$('a[href$="/'+k+'.html"]').parents('.mix').remove();
|
$('a[href$="/'+k+'.html"]').parents('.mix').remove();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
hidden_data = {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$(document).on('click', '.mix', function(e) {
|
||||||
|
if (e.shiftKey) {
|
||||||
|
hidden_data[board_name][$(this).data('id')] = Math.round(Date.now() / 1000);
|
||||||
|
$(this).remove();
|
||||||
|
localStorage.hiddenthreads = JSON.stringify(hidden_data);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
$("#sort_by").change(function(){
|
$("#sort_by").change(function(){
|
||||||
var value = this.value;
|
var value = this.value;
|
||||||
$('#Grid').mixItUp('sort', value);
|
$('#Grid').mixItUp('sort', value);
|
||||||
@ -46,5 +55,4 @@ if (active_page == 'catalog') $(function(){
|
|||||||
if (catalog.image_size !== undefined) {
|
if (catalog.image_size !== undefined) {
|
||||||
$('#image_size').val(catalog.image_size).trigger('change');
|
$('#image_size').val(catalog.image_size).trigger('change');
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@ -37,6 +37,7 @@
|
|||||||
data-reply="{{ post.reply_count }}"
|
data-reply="{{ post.reply_count }}"
|
||||||
data-bump="{{ post.bump }}"
|
data-bump="{{ post.bump }}"
|
||||||
data-time="{{ post.time }}"
|
data-time="{{ post.time }}"
|
||||||
|
data-id="{{ post.id }}"
|
||||||
>
|
>
|
||||||
<div class="thread grid-li grid-size-small">
|
<div class="thread grid-li grid-size-small">
|
||||||
<a href="{{post.link}}">
|
<a href="{{post.link}}">
|
||||||
|
Loading…
Reference in New Issue
Block a user