Make sure no kill screens.
This commit is contained in:
parent
15c7fcc047
commit
63c503c84a
1 changed files with 2 additions and 2 deletions
|
|
@ -72,10 +72,10 @@
|
||||||
// Check if all checkboxes are checked
|
// Check if all checkboxes are checked
|
||||||
const allChecked = Array.from(document.querySelectorAll('.form-check-input')).every(cb => cb.checked);
|
const allChecked = Array.from(document.querySelectorAll('.form-check-input')).every(cb => cb.checked);
|
||||||
const allUnchecked = Array.from(document.querySelectorAll('.form-check-input')).every(cb => !cb.checked);
|
const allUnchecked = Array.from(document.querySelectorAll('.form-check-input')).every(cb => !cb.checked);
|
||||||
if (allChecked && !window.__alreadyNavigated) {
|
if (allChecked && !window.__alreadyNavigated && {{ level }} < 28) {
|
||||||
window.__alreadyNavigated = true;
|
window.__alreadyNavigated = true;
|
||||||
location.href = "{{ url_for('main.coffee', level=level + 1) }}";
|
location.href = "{{ url_for('main.coffee', level=level + 1) }}";
|
||||||
} else if (allUnchecked && !window.__alreadyNavigated) {
|
} else if (allUnchecked && !window.__alreadyNavigated && {{ level }} > -2) {
|
||||||
window.__alreadyNavigated = true;
|
window.__alreadyNavigated = true;
|
||||||
location.href = "{{ url_for('main.coffee', level=level - 1) }}";
|
location.href = "{{ url_for('main.coffee', level=level - 1) }}";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue