Skip to content

Commit

Permalink
Use keyboard.ups
Browse files Browse the repository at this point in the history
Workaround due to elm-lang/keyboard#10
  • Loading branch information
xurtis committed Feb 19, 2018
1 parent 4e46c33 commit bb878d5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions site/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -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);
})
</script>
</body>
Expand Down
2 changes: 1 addition & 1 deletion source/Data.elm
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ subscriptions msg =
SetMap '-'
in
Sub.batch
[ Keyboard.presses pressMessage
[ Keyboard.ups pressMessage
, Crypto.sha_result Hash
]

0 comments on commit bb878d5

Please sign in to comment.