From 4bed134f15355681e364a13f8844c3e0a189358b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonia=20W=C3=BCst?= Date: Thu, 24 Oct 2024 11:27:54 +0200 Subject: [PATCH] Update script.js --- docs/static/js/script.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/static/js/script.js b/docs/static/js/script.js index ff0e3fb..e8d38eb 100644 --- a/docs/static/js/script.js +++ b/docs/static/js/script.js @@ -244,6 +244,8 @@ for (let i = 1; i <= 9; i++) { let draggedImage = null; +let fireworksDisplay; + function dragStart(e) { draggedImage = e.target; } @@ -271,9 +273,9 @@ function checkSolution() { if (!img || parseInt(img.src.slice(-5, -4)) !== puzzle_solution[i][j]) { if (img) { wrong = true; + break; } solved = false; - break; } } @@ -289,8 +291,6 @@ function checkSolution() { } -let fireworksDisplay; - function showModal(message) { const modal = document.getElementById('modal'); const modalMessage = document.getElementById('modal-message'); @@ -338,4 +338,4 @@ function showSimpleModal(message) { modal.style.display = 'none'; } } -} \ No newline at end of file +}