overseer/assets/js/nechryael.js
Gregory Ballantine 8c1c43e4df
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Fixed the cookie/filter thing
2024-05-25 11:47:57 -04:00

15 lines
469 B
JavaScript

$(document).ready(function() {
$('#filter-limit').on('change', () => {
$.cookie('filter_limit', $('#filter-limit').val());
$('#filter-form').submit();
});
// check state of limit filter
var cookie_limit = $.cookie('filter_limit');
// if limit is different than what's selected
var active_limit = $('#filter-limit').val();
if ((cookie_limit) && (cookie_limit != active_limit)) {
$('#filter-limit').val(cookie_limit).trigger('change');
}
});