Luke Jones

intervle - commit a361066

lint: formata36106651a59196822e25015d2f8ef427f76e422LukeJ<luke.jones.2567@gmail.com>2026-03-08T18:49:00Z
diff --git a/resources/js/app.js b/resources/js/app.js index 8c031c9..b15f3e7 100644 --- a/resources/js/app.js +++ b/resources/js/app.js @@ -8,9 +8,9 @@ function initialiseDifficultySelector() { const date = currentGame[2]; options.forEach(option => { - if (option.getAttribute('value') === difficulty) { - option.selected = true; - } + if (option.getAttribute('value') === difficulty) { + option.selected = true; + } }); selector.addEventListener('change', () => { @@ -68,7 +68,7 @@ document.addEventListener('DOMContentLoaded', () => { 'Content-Type': 'application/json', 'X-CSRF-TOKEN': token }, - body: JSON.stringify({ order }) + body: JSON.stringify({order}) }) .then(res => res.json()) .then(data => { @@ -84,9 +84,9 @@ document.addEventListener('DOMContentLoaded', () => { function displayResults(results) { let score = 0; - eventsContainer.querySelectorAll('.event-container').forEach(function(eventContainer, index) { + eventsContainer.querySelectorAll('.event-container').forEach(function (eventContainer, index) { const enteredEvent = eventContainer.getAttribute('data-event'); - if (results.correct_order[index] === + enteredEvent) { + if (results.correct_order[index] === +enteredEvent) { score++; eventContainer.className += ' event-correct'; } else {