From 63c503c84aff6b2059b0b5b3f9927962fa144e93 Mon Sep 17 00:00:00 2001 From: Yaro Kasear Date: Fri, 8 Aug 2025 14:10:36 -0500 Subject: [PATCH] Make sure no kill screens. --- inventory/templates/coffee.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inventory/templates/coffee.html b/inventory/templates/coffee.html index fc2041a..079ce5a 100644 --- a/inventory/templates/coffee.html +++ b/inventory/templates/coffee.html @@ -72,10 +72,10 @@ // Check if all checkboxes are 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); - if (allChecked && !window.__alreadyNavigated) { + if (allChecked && !window.__alreadyNavigated && {{ level }} < 28) { window.__alreadyNavigated = true; location.href = "{{ url_for('main.coffee', level=level + 1) }}"; - } else if (allUnchecked && !window.__alreadyNavigated) { + } else if (allUnchecked && !window.__alreadyNavigated && {{ level }} > -2) { window.__alreadyNavigated = true; location.href = "{{ url_for('main.coffee', level=level - 1) }}"; }