2014-05-05 15:23:49 +00:00
|
|
|
if (active_page == 'catalog') $(function(){
|
2014-10-22 04:06:34 +00:00
|
|
|
if (localStorage.catalog !== undefined) {
|
|
|
|
var catalog = JSON.parse(localStorage.catalog);
|
|
|
|
} else {
|
|
|
|
var catalog = {};
|
|
|
|
localStorage.catalog = JSON.stringify(catalog);
|
|
|
|
}
|
|
|
|
|
2014-08-08 20:48:38 +00:00
|
|
|
$("#sort_by").change(function(){
|
|
|
|
var value = this.value;
|
2021-03-20 04:48:20 +00:00
|
|
|
$('#Grid').mixItUp('sort', (((value == "random") || (board_name == "overboard")) ? value : "sticky:desc " + value));
|
2014-10-22 04:06:34 +00:00
|
|
|
catalog.sort_by = value;
|
|
|
|
localStorage.catalog = JSON.stringify(catalog);
|
2014-03-17 02:21:01 +00:00
|
|
|
});
|
|
|
|
|
2014-08-08 20:48:38 +00:00
|
|
|
$("#image_size").change(function(){
|
2021-03-20 04:48:20 +00:00
|
|
|
var value = this.value;
|
2014-09-20 04:40:43 +00:00
|
|
|
$(".grid-li").removeClass("grid-size-vsmall");
|
|
|
|
$(".grid-li").removeClass("grid-size-small");
|
|
|
|
$(".grid-li").removeClass("grid-size-large");
|
2014-08-08 20:48:38 +00:00
|
|
|
$(".grid-li").addClass("grid-size-"+value);
|
2014-10-22 04:06:34 +00:00
|
|
|
catalog.image_size = value;
|
|
|
|
localStorage.catalog = JSON.stringify(catalog);
|
2014-03-17 02:21:01 +00:00
|
|
|
});
|
|
|
|
|
2014-10-22 04:06:34 +00:00
|
|
|
$('#Grid').mixItUp({
|
|
|
|
animation: {
|
|
|
|
enable: false
|
2015-03-06 10:01:53 +00:00
|
|
|
}
|
2014-03-17 02:21:01 +00:00
|
|
|
});
|
|
|
|
|
2014-10-22 04:06:34 +00:00
|
|
|
if (catalog.sort_by !== undefined) {
|
|
|
|
$('#sort_by').val(catalog.sort_by).trigger('change');
|
|
|
|
}
|
|
|
|
if (catalog.image_size !== undefined) {
|
|
|
|
$('#image_size').val(catalog.image_size).trigger('change');
|
|
|
|
}
|
2015-05-10 04:51:35 +00:00
|
|
|
|
|
|
|
$('div.thread').on('click', function(e) {
|
|
|
|
if ($(this).css('overflow-y') === 'hidden') {
|
|
|
|
$(this).css('overflow-y', 'auto');
|
|
|
|
$(this).css('width', '100%');
|
|
|
|
} else {
|
|
|
|
$(this).css('overflow-y', 'hidden');
|
|
|
|
$(this).css('width', 'auto');
|
|
|
|
}
|
|
|
|
});
|
2021-01-18 22:30:21 +00:00
|
|
|
|
|
|
|
$('#post-form-opener').on('click', function(e) {
|
|
|
|
$('#post-form-container').css('display', 'unset');
|
|
|
|
$('#post-form-opener').css('display', 'none');
|
|
|
|
});
|
2014-03-17 02:21:01 +00:00
|
|
|
});
|