Make sure no kill screens.

This commit is contained in:
Yaro Kasear 2025-08-08 14:10:36 -05:00
parent 15c7fcc047
commit 63c503c84a

View file

@ -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) }}";
} }