Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
Lennart
/
morse
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 14aad4bd
authored
Jun 11, 2014
by
Lennart
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
chrome bug
1 parent
53b18305
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
index.html
index.html
View file @
14aad4b
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
<label
for=
"input"
>
Speed (WPM)
</label>
<label
for=
"input"
>
Speed (WPM)
</label>
<input
name=
"wpm"
id=
"wpm"
type=
"number"
value=
"13"
/>
<input
name=
"wpm"
id=
"wpm"
type=
"number"
value=
"13"
/>
<button
type=
"button"
onclick=
"translate
();
"
class=
"pure-button"
>
Translate
</button>
<button
type=
"button"
onclick=
"translate
Morse()
"
class=
"pure-button"
>
Translate
</button>
<button
type=
"submit"
class=
"pure-button pure-button-primary"
>
Play
</button>
<button
type=
"submit"
class=
"pure-button pure-button-primary"
>
Play
</button>
<button
type=
"button"
onclick=
"stop();"
class=
"pure-button"
>
Stop
</button>
<button
type=
"button"
onclick=
"stop();"
class=
"pure-button"
>
Stop
</button>
</fieldset>
</fieldset>
...
@@ -48,7 +48,7 @@
...
@@ -48,7 +48,7 @@
var
morseAudio
;
var
morseAudio
;
function
play
()
{
function
play
()
{
translate
();
translate
Morse
();
var
wpm
=
parseInt
(
document
.
getElementById
(
"wpm"
).
value
);
var
wpm
=
parseInt
(
document
.
getElementById
(
"wpm"
).
value
);
if
(
typeof
wpm
===
'number'
&&
wpm
%
1
==
0
&&
wpm
>
0
)
{
if
(
typeof
wpm
===
'number'
&&
wpm
%
1
==
0
&&
wpm
>
0
)
{
...
@@ -62,7 +62,7 @@
...
@@ -62,7 +62,7 @@
return
false
;
return
false
;
}
}
function
translate
()
{
function
translate
Morse
()
{
var
sentence
=
document
.
getElementById
(
"input"
).
value
;
var
sentence
=
document
.
getElementById
(
"input"
).
value
;
document
.
getElementById
(
"output"
).
value
=
morse
.
sentenceToMorseString
(
sentence
);
document
.
getElementById
(
"output"
).
value
=
morse
.
sentenceToMorseString
(
sentence
);
}
}
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment