// This is your list of verses. Add as many as you want! const verses = [ { text: "The Lord is my shepherd; I shall not want.", ref: "Psalm 23:1" }, { text: "Be still, and know that I am God.", ref: "Psalm 46:10" }, { text: "Arise, shine, for your light has come.", ref: "Isaiah 60:1" }, { text: "The wind blows where it wishes, and you hear its sound.", ref: "John 3:8" }, { text: "But Mary treasured up all these things and pondered them in her heart.", ref: "Luke 2:19" }, { text: "But Mary treasured up all these things and pondered them in her heart.", ref: "Luke 2:19" }, { text: "But Mary treasured up all these things and pondered them in her heart.", ref: "Luke 2:19" }, { text: "But Mary treasured up all these things and pondered them in her heart.", ref: "Luke 2:19" }, ]; function revealVerse() { const display = document.getElementById('verse-display'); const textElem = document.getElementById('verse-text'); const refElem = document.getElementById('verse-ref'); // Pick a random verse from the array const randomIndex = Math.floor(Math.random() * verses.length); const selected = verses[randomIndex]; // This resets and triggers the CSS fade-in animation display.classList.remove('fade-in'); void display.offsetWidth; display.classList.add('fade-in'); // Inject the text into your HTML textElem.innerText = `"${selected.text}"`; refElem.innerText = `— ${selected.ref}`; } function copyVerse() { const text = document.getElementById('verse-text').innerText; const ref = document.getElementById('verse-ref').innerText; const fullText = `${text} ${ref}`; // This copies the text to the clipboard navigator.clipboard.writeText(fullText).then(() => { // Optional: Give the user a tiny "Success" hint const btn = document.querySelector('.copy-btn'); const originalText = btn.innerText; btn.innerText = "Saved to Clipboard"; setTimeout(() => { btn.innerText = originalText; }, 2000); }); }