// Bible Typing Practice Module // ESV Bible verses for typing practice // Popular Bible verses for typing practice const bibleVerses = [ { reference: "John 3:16", text: "For God so loved the world, that he gave his only Son, that whoever believes in him should not perish but have eternal life." }, { reference: "Philippians 4:13", text: "I can do all things through him who strengthens me." }, { reference: "Romans 8:28", text: "And we know that for those who love God all things work together for good, for those who are called according to his purpose." }, { reference: "Jeremiah 29:11", text: "For I know the plans I have for you, declares the Lord, plans for welfare and not for evil, to give you a future and a hope." }, { reference: "Proverbs 3:5-6", text: "Trust in the Lord with all your heart, and do not lean on your own understanding. In all your ways acknowledge him, and he will make straight your paths." }, { reference: "Psalm 23:1", text: "The Lord is my shepherd; I shall not want." }, { reference: "Isaiah 40:31", text: "But they who wait for the Lord shall renew their strength; they shall mount up with wings like eagles; they shall run and not be weary; they shall walk and not faint." }, { reference: "Matthew 28:19-20", text: "Go therefore and make disciples of all nations, baptizing them in the name of the Father and of the Son and of the Holy Spirit, teaching them to observe all that I have commanded you. And behold, I am with you always, to the end of the age." }, { reference: "1 Corinthians 13:4-5", text: "Love is patient and kind; love does not envy or boast; it is not arrogant or rude. It does not insist on its own way; it is not irritable or resentful." }, { reference: "Ephesians 2:8-9", text: "For by grace you have been saved through faith. And this is not your own doing; it is the gift of God, not a result of works, so that no one may boast." }, { reference: "Psalm 119:105", text: "Your word is a lamp to my feet and a light to my path." }, { reference: "Romans 12:2", text: "Do not be conformed to this world, but be transformed by the renewal of your mind, that by testing you may discern what is the will of God, what is good and acceptable and perfect." }, { reference: "2 Timothy 3:16", text: "All Scripture is breathed out by God and profitable for teaching, for reproof, for correction, and for training in righteousness." }, { reference: "Psalm 46:10", text: "Be still, and know that I am God. I will be exalted among the nations, I will be exalted in the earth!" }, { reference: "Matthew 6:33", text: "But seek first the kingdom of God and his righteousness, and all these things will be added to you." } { reference: "John 11:36", text: "Jesus wept." } ]; // Global state for Bible typing let currentVerse = null; let typingStartTime = null; // Initialize Bible typing window.startBibleTyping = function() { console.log('📖 Starting Bible typing practice'); const user = JSON.parse(localStorage.getItem('loggedInUser')); if (!user) { alert('Please log in first'); return; } // Hide other sections document.getElementById('studentPanel').style.display = 'none'; document.getElementById('gameSection').style.display = 'none'; document.getElementById('typingSection').style.display = 'none'; // Show Bible section document.getElementById('bibleSection').classList.remove('hidden'); document.getElementById('bibleSection').style.display = 'block'; // Populate verse dropdown populateVerseDropdown(); // Reset the interface resetBibleInterface(); } // Populate the verse selection dropdown function populateVerseDropdown() { const select = document.getElementById('verseSelect'); select.innerHTML = ''; bibleVerses.forEach((verse, index) => { const option = document.createElement('option'); option.value = index; option.textContent = verse.reference; select.appendChild(option); }); } // Load selected verse window.loadSelectedVerse = function() { const select = document.getElementById('verseSelect'); const index = parseInt(select.value); if (isNaN(index) || index < 0 || index >= bibleVerses.length) { resetBibleInterface(); return; } currentVerse = bibleVerses[index]; displayVerse(); } // Get random verse window.getRandomVerse = function() { const randomIndex = Math.floor(Math.random() * bibleVerses.length); currentVerse = bibleVerses[randomIndex]; // Update dropdown document.getElementById('verseSelect').value = randomIndex; displayVerse(); } // Display the selected verse function displayVerse() { if (!currentVerse) return; const display = document.getElementById('bibleVerseDisplay'); display.innerHTML = `