README update, code cleanup

This commit is contained in:
Gene Mecija 2020-03-03 01:03:55 -08:00
parent 2a7d6f8a87
commit 0ce7951d6d
2 changed files with 23 additions and 14 deletions

View file

@ -1,14 +1,14 @@
# Learn Morse Code
[LearnMorseCode.net](http://learnmorsecode.net) helps beginners learn Morse code through several features, the main of which is a telegraph with live translation.
<table><tr><td>
<img src="telegraph.gif"
width=325px
shadow=10px>
</td></tr></table>
Watch the video demo [here](https://www.youtube.com/embed/OuL-Z8h4gBQ).
## Features
* **Telegraph**\
Press the button(s) to generate tones. See a live translation of your tones in both Morse code and alphanumeric characters. Customize the telegraph by choosing the telegraph type, tone frequency, and speed (WPM).

View file

@ -16,18 +16,27 @@ function WordListPickerContextProvider(props) {
let wordList = []
if (wordListCategory === 'alphabet') {
wordList = alphabet.words
} else if (wordListCategory === 'numbers') {
wordList = numbers.words
} else if (wordListCategory === 'boys') {
wordList = boys.words
} else if (wordListCategory === 'girls') {
wordList = girls.words
} else if (wordListCategory === 'startrek') {
wordList = trek.words
} else if (wordListCategory === 'common100') {
wordList = common100.words
switch (wordListCategory) {
case "alphabet":
wordList = alphabet.words
break
case "numbers":
wordList = numbers.words
break
case "boys":
wordList = boys.words
break
case "girls":
wordList = girls.words
break
case "startrek":
wordList = trek.words
break
case "common100":
wordList = common100.words
break
default:
wordList = alphabet.words
}
const wordListCountMax = wordList.length