fix #all
This commit is contained in:
parent
e1718bb861
commit
df0190c950
1 changed files with 6 additions and 3 deletions
|
@ -95,15 +95,18 @@ function makeFragment() {
|
|||
|
||||
function useFragment() {
|
||||
let frag = decodeURIComponent(location.hash).replace(/^#/, '');
|
||||
let details = document.getElementById('filters-details');
|
||||
|
||||
if (frag == 'all' || !frag) {
|
||||
if (!frag) {
|
||||
clearForm();
|
||||
} else if (frag == 'all') {
|
||||
allBoxes.forEach(b => b.checked = false);
|
||||
details.open = false;
|
||||
} else {
|
||||
let set = new Set(frag.split(';'));
|
||||
let re = /^(require|exclude)_|hide_filters/;
|
||||
if (new Array(...set).every(x => re.test(x))) {
|
||||
if (Array.from(set).every(x => re.test(x))) {
|
||||
allBoxes.forEach(b => b.checked = set.has(b.id));
|
||||
let details = document.getElementById('filters-details');
|
||||
details.open = !set.has('hide_filters');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue