reorganize files

This commit is contained in:
2025-01-30 16:28:56 +02:00
parent 594a5fc0d5
commit f8bb71a184
94 changed files with 2 additions and 25 deletions

14
public/js/consent.js Normal file
View File

@@ -0,0 +1,14 @@
document.addEventListener('DOMContentLoaded', function() {
const consentButton = document.getElementById('consentButton');
consentButton.addEventListener('click', function() {
fetch('../data/questions.json')
.then(response => response.json())
.then(data => {
const quizVersions = Object.keys(data.quizzes);
const randomVersion = quizVersions[Math.floor(Math.random() * quizVersions.length)];
localStorage.setItem('quizVersion', randomVersion);
window.location.href = 'quiz.html';
});
});
});