|
1 | 1 | if (!isMobile) { |
2 | | -function constructVerseURL(verse) { |
3 | | -const [book, chapter_verse] = verse.split(' '); |
4 | | -const [chapter, verse_range] = chapter_verse.split(':'); |
5 | | -const formatted_book = book.toLowerCase().substring(0, 3); |
6 | | -return `https://www.blb.org/csb/${formatted_book}/${chapter}/${verse_range}`; |
7 | | -} |
| 2 | +const constructVerseURL = (ref) => { |
| 3 | + const lastSpace = ref.lastIndexOf(' '); |
| 4 | + const bookPart = lastSpace > -1 ? ref.slice(0, lastSpace).trim() : ref.trim(); |
| 5 | + const chapterVerse = lastSpace > -1 ? ref.slice(lastSpace + 1) : ''; |
| 6 | + const [chapter, verse_range] = chapterVerse.split(':'); |
| 7 | + const formatted_book = bookPart.replace(/\s+/g, '').toLowerCase().substring(0, 3); |
| 8 | + return `https://blb.org/csb/${formatted_book}/${chapter}/${verse_range}`; |
| 9 | +}; |
8 | 10 | function displayRandomBibleVerse() { |
9 | 11 | const headerVerse = document.getElementById('header-verse'); |
10 | 12 | headerVerse.style.display = 'block'; |
@@ -52,57 +54,111 @@ function displayRandomBibleVerse() { |
52 | 54 | document.addEventListener("DOMContentLoaded", function() { |
53 | 55 | displayRandomBibleVerse(); |
54 | 56 | }); |
55 | | -const bibleVerses = [[ |
56 | | -"Philippians 4:7", |
57 | | -"And the peace of God, which surpasses all understanding, will guard your hearts and minds in Christ Jesus." |
58 | | -],[ |
59 | | -"Exodus 3:14", |
60 | | -"God replied to Moses, 'I AM WHO I AM. This is what you are to say to the Israelites: I AM has sent me to you.'" |
61 | | -],[ |
62 | | -"John 6:35", |
63 | | -"I am the bread of life. Whoever comes to me will never go hungry, and whoever believes in me will never be thirsty." |
64 | | -],[ |
65 | | -"John 8:12", |
66 | | -"I am the light of the world. Whoever follows me will never walk in darkness, but will have the light of life." |
67 | | -],[ |
68 | | -"John 10:9", |
69 | | -"I am the gate; whoever enters through me will be saved." |
70 | | -],[ |
71 | | -"John 11:25-26", |
72 | | -"I am the resurrection and the life. The one who believes in me will live, even though they die; and whoever lives by believing in me will never die." |
73 | | -],[ |
74 | | -"John 14:6", |
75 | | -"I am the way and the truth and the life. No one comes to the Father except through me." |
76 | | -],[ |
77 | | -"John 15:1", |
78 | | -"I am the true vine, and my Father is the gardener." |
79 | | -],[ |
80 | | -"John 8:58", |
81 | | -"Truly, truly, I say to you, before Abraham was, I am." |
82 | | -],[ |
83 | | -"Revelation 1:8", |
84 | | -"I am the Alpha and the Omega, says the Lord God, who is, and who was, and who is to come, the Almighty." |
85 | | -],[ |
86 | | -"Proverbs 3:5-6", |
87 | | -"Trust in the Lord with all your heart, and do not rely on your own understanding; in all your ways know him, and he will make your paths straight." |
88 | | -],[ |
89 | | -"2 Corinthians 5:17", |
90 | | -"Therefore, if anyone is in Christ, he is a new creation; the old has passed away, and see, the new has come!" |
91 | | -],[ |
92 | | -"Matthew 6:24", |
93 | | -"No one can serve two masters, since either he will hate one and love the other, or he will be devoted to one and despise the other. You cannot serve both God and money." |
94 | | -],[ |
95 | | -"2 Timothy 1:7", |
96 | | -"For God has not given us a spirit of fear, but of power and of love and of a sound mind." |
97 | | -],[ |
98 | | -"Romans 12:2", |
99 | | -"Do not be conformed to this age, but be transformed by the renewing of your mind, so that you may discern what is the good, pleasing, and perfect will of God." |
100 | | -],[ |
101 | | -"Proverbs 9:8-9", |
102 | | -"Do not rebuke mockers or they will hate you; rebuke the wise and they will love you. Instruct the wise and they will be wiser still; teach the righteous and they will add to their learning." |
103 | | -],[ |
104 | | -"Galatians 2:20", |
105 | | -"I have been crucified with Christ, and I no longer live, but Christ lives in me. The life I now live in the body, I live by faith in the Son of God, who loved me and gave himself for me." |
106 | | -]]; |
| 57 | +const bibleVerses = [ |
| 58 | + |
| 59 | +["Psalm 119:105", |
| 60 | +"Your word is a lamp for my feet and a light on my path."], |
| 61 | +["Romans 8:38-39", |
| 62 | +"For I am persuaded that neither death nor life, nor angels nor rulers, nor things present nor things to come, nor powers, nor height nor depth, nor any other created thing will be able to separate us from the love of God that is in Christ Jesus our Lord."], |
| 63 | +["Ephesians 6:10-11", |
| 64 | +"Finally, be strengthened by the Lord and by his vast strength. Put on the full armor of God so that you can stand against the schemes of the devil."], |
| 65 | +["Matthew 5:14-16", |
| 66 | +"You are the light of the world. A city situated on a hill cannot be hidden. No one lights a lamp and puts it under a basket, but rather on a lampstand, and it gives light for all who are in the house. In the same way, let your light shine before others, so that they may see your good works and give glory to your Father in heaven."], |
| 67 | +["1 John 4:8", |
| 68 | +"The one who does not love does not know God, because God is love."], |
| 69 | +["Psalm 37:4", |
| 70 | +"Take delight in the Lord, and he will give you your heart's desires."], |
| 71 | +["Colossians 3:23", |
| 72 | +"Whatever you do, do it from the heart, as something done for the Lord and not for people."], |
| 73 | +["Isaiah 40:31", |
| 74 | +"but those who trust in the Lord will renew their strength; they will soar on wings like eagles; they will run and not become weary, they will walk and not faint."], |
| 75 | +["Matthew 22:37-39", |
| 76 | +"He said to him, 'Love the Lord your God with all your heart, with all your soul, and with all your mind. This is the greatest and most important command. The second is like it: Love your neighbor as yourself.'"], |
| 77 | +["Psalm 23:4", |
| 78 | +"Even when I go through the darkest valley, I fear no danger, for you are with me; your rod and your staff—they comfort me."], |
| 79 | +["1 Corinthians 13:4-7", |
| 80 | +"Love is patient, love is kind. Love does not envy, is not boastful, is not arrogant, is not rude, is not self-seeking, is not irritable, and does not keep a record of wrongs. Love finds no joy in unrighteousness but rejoices in the truth. It bears all things, believes all things, hopes all things, endures all things."], |
| 81 | +["James 1:2-4", |
| 82 | +"Consider it a great joy, my brothers and sisters, whenever you experience various trials, because you know that the testing of your faith produces endurance. And let endurance have its full effect, so that you may be mature and complete, lacking nothing."], |
| 83 | +["Psalm 46:1", |
| 84 | +"God is our refuge and strength, a helper who is always found in times of trouble."], |
| 85 | +["Romans 5:8", |
| 86 | +"But God proves his own love for us in that while we were still sinners, Christ died for us."], |
| 87 | +["Proverbs 18:10", |
| 88 | +"The name of the Lord is a strong tower; the righteous run to it and are protected."], |
| 89 | +["Hebrews 11:1", |
| 90 | +"Now faith is the reality of what is hoped for, the proof of what is not seen."], |
| 91 | +["Psalm 27:1", |
| 92 | +"The Lord is my light and my salvation—whom should I fear? The Lord is the stronghold of my life—whom should I dread?"], |
| 93 | +["John 10:11", |
| 94 | +"I am the good shepherd. The good shepherd lays down his life for the sheep."], |
| 95 | +["Hebrews 13:8", |
| 96 | +"Jesus Christ is the same yesterday, today, and forever."], |
| 97 | +["Isaiah 41:10", |
| 98 | +"Do not fear, for I am with you; do not be afraid, for I am your God. I will strengthen you; I will help you; I will hold on to you with my righteous right hand."], |
| 99 | +["Jeremiah 29:11", |
| 100 | +"For I know the plans I have for you—this is the Lord's declaration—plans for your well-being, not for disaster, to give you a future and a hope."], |
| 101 | +["Romans 8:28", |
| 102 | +"We know that all things work together for the good of those who love God, who are called according to his purpose."], |
| 103 | +["Ephesians 2:8-9", |
| 104 | +"For you are saved by grace through faith, and this is not from yourselves; it is God's gift— not from works, so that no one can boast."], |
| 105 | +["Philippians 4:13", |
| 106 | +"I am able to do all things through Him who strengthens me."], |
| 107 | +["Psalm 46:10", |
| 108 | +"Stop your fighting, and know that I am God, exalted among the nations, exalted on the earth."], |
| 109 | +["Matthew 28:20", |
| 110 | +"teaching them to observe everything I have commanded you. And remember, I am with you always, to the end of the age."], |
| 111 | +["1 Corinthians 10:13", |
| 112 | +"No temptation has overtaken you except what is common to humanity. God is faithful and He will not allow you to be tempted beyond what you are able, but with the temptation He will also provide a way of escape, so that you are able to bear it."], |
| 113 | +["Psalm 23:1", |
| 114 | +"The Lord is my shepherd; I have what I need."], |
| 115 | +["Isaiah 9:6", |
| 116 | +"For a child will be born for us, a son will be given to us, and the government will be on his shoulders. He will be named Wonderful Counselor, Mighty God, Eternal Father, Prince of Peace."], |
| 117 | +["Matthew 11:28-30", |
| 118 | +"Come to me, all of you who are weary and burdened, and I will give you rest. Take my yoke upon you and learn from me, because I am lowly and humble in heart, and you will find rest for your souls. For my yoke is easy and my burden is light."], |
| 119 | +["James 1:5", |
| 120 | +"Now if any of you lacks wisdom, he should ask God, who gives to all generously and without criticizing, and it will be given to him."], |
| 121 | +["1 Peter 5:7", |
| 122 | +"casting all your cares on him, because he cares about you."], |
| 123 | +["Joshua 1:9", |
| 124 | +"Haven't I commanded you: be strong and courageous? Do not be afraid or discouraged, for the Lord your God is with you wherever you go."], |
| 125 | +["Deuteronomy 31:6", |
| 126 | +"Be strong and courageous; don't be terrified or afraid of them. For it is the Lord your God who goes with you; He will not leave you or forsake you."], |
| 127 | +["Philippians 4:7", |
| 128 | +"And the peace of God, which surpasses all understanding, will guard your hearts and minds in Christ Jesus."], |
| 129 | +["Exodus 3:14", |
| 130 | +"God replied to Moses, 'I AM WHO I AM. This is what you are to say to the Israelites: I AM has sent me to you.'"], |
| 131 | +["John 6:35", |
| 132 | +"I am the bread of life. Whoever comes to me will never go hungry, and whoever believes in me will never be thirsty."], |
| 133 | +["John 8:12", |
| 134 | +"I am the light of the world. Whoever follows me will never walk in darkness, but will have the light of life."], |
| 135 | +["John 10:9", |
| 136 | +"I am the gate; whoever enters through me will be saved."], |
| 137 | +["John 11:25-26", |
| 138 | +"I am the resurrection and the life. The one who believes in me will live, even though they die; and whoever lives by believing in me will never die."], |
| 139 | +["John 14:6", |
| 140 | +"I am the way and the truth and the life. No one comes to the Father except through me."], |
| 141 | +["John 15:1", |
| 142 | +"I am the true vine, and my Father is the gardener."], |
| 143 | +["John 8:58", |
| 144 | +"Truly, truly, I say to you, before Abraham was, I am."], |
| 145 | +["Revelation 1:8", |
| 146 | +"I am the Alpha and the Omega, says the Lord God, who is, and who was, and who is to come, the Almighty."], |
| 147 | +["Proverbs 3:5-6", |
| 148 | +"Trust in the Lord with all your heart, and do not rely on your own understanding; in all your ways know him, and he will make your paths straight."], |
| 149 | +["2 Corinthians 5:17", |
| 150 | +"Therefore, if anyone is in Christ, he is a new creation; the old has passed away, and see, the new has come!"], |
| 151 | +["Matthew 6:24", |
| 152 | +"No one can serve two masters, since either he will hate one and love the other, or he will be devoted to one and despise the other. You cannot serve both God and money."], |
| 153 | +["2 Timothy 1:7", |
| 154 | +"For God has not given us a spirit of fear, but of power and of love and of a sound mind."], |
| 155 | +["Romans 12:2", |
| 156 | +"Do not be conformed to this age, but be transformed by the renewing of your mind, so that you may discern what is the good, pleasing, and perfect will of God."], |
| 157 | +["Proverbs 9:8-9", |
| 158 | +"Do not rebuke mockers or they will hate you; rebuke the wise and they will love you. Instruct the wise and they will be wiser still; teach the righteous and they will add to their learning."], |
| 159 | +["Galatians 2:20", |
| 160 | +"I have been crucified with Christ, and I no longer live, but Christ lives in me. The life I now live in the body, I live by faith in the Son of God, who loved me and gave himself for me."] |
| 161 | + |
| 162 | +]; |
107 | 163 |
|
108 | 164 | } |
0 commit comments