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

Popular posts from this blog

GK Mix Test 7

General Knowledge Mix Test 1 * Designed by Shrikant Sir EXAM LOGIN VERIFY & START ● LIVE 60s SUBMIT TEST Exam Result of General Knowledge Online Exam Response Sheet NAME: PSN ID: SCORE: RESULT: DATE: TIME: 🖨️ PRINT RECORD LO...

Test No.01

Kids Campus : GK Test No.1 Topic: Oceans & Sea Life Score: 0 / 10 1. Which animal is the largest creature to ever live on Earth? A) Elephant B) Blue Whale C) Great White Shark D) Giant Squid 2. How many arms does an octopus typically have? A) 6 B) 8 C) 10 D) 5 3. What do fish use to breathe underwater? A) Lungs B) Nose C) Gills D) Fins 4. Which of these is the world's largest ocean? A) Pacific Ocean B) Atlantic Ocean C) Indian Ocean D) Arctic Ocean 5. A group of fish swimming together is called a...? A) Pack B) School ...