Generalize ignoring sticky threads on overboard catalogs

This commit is contained in:
discomrade 2021-10-02 04:59:12 +00:00
parent 8acc328c91
commit b518cc94c3
3 changed files with 4 additions and 2 deletions

View File

@ -8,7 +8,7 @@ if (active_page == 'catalog') $(function(){
$("#sort_by").change(function(){
var value = this.value;
$('#Grid').mixItUp('sort', (((value == "random") || (board_name == "overboard")) ? value : "sticky:desc " + value));
$('#Grid').mixItUp('sort', (((value == "random") || is_overboard) ? value : "sticky:desc " + value));
catalog.sort_by = value;
localStorage.catalog = JSON.stringify(catalog);
});

View File

@ -6,7 +6,8 @@
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<script type='text/javascript'>
var active_page = "catalog"
, board_name = "{{ board.uri }}";
, board_name = "{{ board.uri }}"
, is_overboard = "{{ is_overboard }}";
</script>
<title>{{ settings.title }} ( /{{ board.title|e }}/ )</title>
{% include 'header.html' %}

View File

@ -488,6 +488,7 @@
'recent_posts' => $recent_posts,
'stats' => array(),
'board' => $board,
'is_overboard' => $is_overboard,
'link' => $board_link,
'no_post_form' => false,
);