Loading...
🎂 Happy Birthday: No One's have Birthday Today in School ,
* New NOTICE: From the Date of 26/01/2026 we are Going to Launch our School site!
Skip to main content

Marathi Quiz No.1

* Designed by ShrikantSir

मराठी .1

Streak: 0 / 25
60s
Initializing Set 12...
let currentIndex = 0, timeLeft = 60, timerInterval; const winSnd = new Audio('https://actions.google.com/sounds/v1/cartoon/clime.ogg'); const loseSnd = new Audio('https://actions.google.com/sounds/v1/foley/metal_clank.ogg'); function startTimer() { clearInterval(timerInterval); timeLeft = 60; updateTimerUI(); timerInterval = setInterval(() => { timeLeft--; updateTimerUI(); if (timeLeft <= 0) triggerFail(); }, 1000); } function updateTimerUI() { document.getElementById('math-timer').innerText = timeLeft; document.getElementById('time-fill').style.width = (timeLeft / 60 * 100) + "%"; } function loadQuestion() { const data = quizData[currentIndex]; document.getElementById('streak-val').innerText = currentIndex; document.getElementById('question-text').innerText = data.q; const container = document.getElementById('options-container'); container.innerHTML = ""; const shuffledOptions = [...data.o].sort(() => Math.random() - 0.5); shuffledOptions.forEach(opt => { const btn = document.createElement('button'); btn.className = 'opt-btn'; btn.innerText = opt; btn.onclick = () => checkMastery(btn, data.a); container.appendChild(btn); }); startTimer(); } function checkMastery(clickedBtn, correctAnswer) { clearInterval(timerInterval); const allButtons = document.querySelectorAll('.opt-btn'); allButtons.forEach(b => b.style.pointerEvents = 'none'); if (clickedBtn.innerText === correctAnswer) { clickedBtn.classList.add('correct-flash'); winSnd.play(); confetti({ particleCount: 100, spread: 70, origin: { y: 0.8 }, colors: ['#ff0099', '#ffff00'] }); setTimeout(() => { currentIndex++; if (currentIndex >= quizData.length) showWinScreen(); else loadQuestion(); }, 1000); } else { clickedBtn.classList.add('wrong-flash'); allButtons.forEach(b => { if (b.innerText === correctAnswer) b.classList.add('correct-flash'); }); loseSnd.play(); setTimeout(() => { triggerFail(); }, 2000); } } function triggerFail() { document.getElementById('quiz-master-box').classList.add('shake'); setTimeout(() => { document.getElementById('quiz-master-box').classList.remove('shake'); currentIndex = 0; loadQuestion(); }, 800); } function resetToStart() { currentIndex = 0; document.getElementById('game-area').style.display = 'block'; document.getElementById('win-screen').style.display = 'none'; loadQuestion(); } function showWinScreen() { document.getElementById('game-area').style.display = 'none'; document.getElementById('win-screen').style.display = 'block'; confetti({ particleCount: 500, spread: 150 }); } loadQuestion();

Comments