From bb878d5e80131b0f30adb7546c51dbb88fafb811 Mon Sep 17 00:00:00 2001 From: Curtis Millar Date: Mon, 19 Feb 2018 21:46:08 +1100 Subject: [PATCH] Use keyboard.ups Workaround due to elm-lang/keyboard#10 --- site/index.html | 6 ++++-- source/Data.elm | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/site/index.html b/site/index.html index b6b2443..b91f737 100644 --- a/site/index.html +++ b/site/index.html @@ -25,9 +25,11 @@ // Hooking the Sha ports app.ports.sha256.subscribe(function (text) { var sha = new jsSHA("SHA-256", "TEXT"); - console.log(text); + // console.log(text); sha.update(text); - app.ports.sha_result.send(sha.getHash("HEX")); + var hash = sha.getHash("HEX"); + // console.log(hash); + app.ports.sha_result.send(hash); }) diff --git a/source/Data.elm b/source/Data.elm index 51c59ee..93e3498 100644 --- a/source/Data.elm +++ b/source/Data.elm @@ -133,7 +133,7 @@ subscriptions msg = SetMap '-' in Sub.batch - [ Keyboard.presses pressMessage + [ Keyboard.ups pressMessage , Crypto.sha_result Hash ]