Add eslint and style fix

This commit is contained in:
Alex Ling
2022-08-19 11:40:41 +00:00
parent e4af194d0c
commit 28c098a56e
19 changed files with 1795 additions and 1677 deletions

View File

@@ -1,15 +1,15 @@
$(() => {
$('#sort-select').change(() => {
const sort = $('#sort-select').find(':selected').attr('id');
const ary = sort.split('-');
const by = ary[0];
const dir = ary[1];
$('#sort-select').change(() => {
const sort = $('#sort-select').find(':selected').attr('id');
const ary = sort.split('-');
const by = ary[0];
const dir = ary[1];
const url = `${location.protocol}//${location.host}${location.pathname}`;
const newURL = `${url}?${$.param({
sort: by,
ascend: dir === 'up' ? 1 : 0
})}`;
window.location.href = newURL;
});
const url = `${location.protocol}//${location.host}${location.pathname}`;
const newURL = `${url}?${$.param({
sort: by,
ascend: dir === 'up' ? 1 : 0,
})}`;
window.location.href = newURL;
});
});