diff options
author | Joris | 2016-09-04 21:21:11 +0200 |
---|---|---|
committer | Joris | 2016-09-04 21:21:31 +0200 |
commit | 973a039b54327df74396605410ea9abe19c8a4e7 (patch) | |
tree | c702564d17e0a490d56845027238eb4f231be785 /index.html | |
parent | 62fee9133f36f655c1ed83e0c2e85394f9948bf5 (diff) |
Upgrade to elm 0.17.1
Diffstat (limited to 'index.html')
-rw-r--r-- | index.html | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/index.html b/index.html deleted file mode 100644 index f5f825e..0000000 --- a/index.html +++ /dev/null @@ -1,47 +0,0 @@ -<!doctype HTML> - -<html> - - <head> - <title>Timer</title> - <meta charset="utf-8"> - <link rel="stylesheet" href="design/reset.css"> - <link rel="stylesheet" href="design/design.css"> - <link rel="stylesheet" href="design/font-awesome/css/font-awesome.min.css"> - <link rel="icon" type="image/png" href="images/icon.png"> - <script src="elm.js"></script> - </head> - - <body> - </body> - - <script> - var timer = Elm.fullscreen(Elm.Main, { - initialTime: new Date().getTime(), - keyPress: 0 - }); - - const sound = new Audio('alarm.wav'); - sound.addEventListener('ended', function() { - this.currentTime = 0; - this.play(); - }, false); - - timer.ports.ringingTimers.subscribe(function(isRinging) { - if(isRinging) { - document.title = "~\\ Timer /~"; - sound.play(); - } else { - document.title = "Timer"; - sound.pause(); - sound.currentTime = 0; - } - }); - - document.onkeypress = function(event) { - timer.ports.keyPress.send(event.which); - }; - - </script> - -</html> |