aboutsummaryrefslogtreecommitdiff
path: root/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'index.html')
-rw-r--r--index.html15
1 files changed, 12 insertions, 3 deletions
diff --git a/index.html b/index.html
index 96f8934..352f6b1 100644
--- a/index.html
+++ b/index.html
@@ -16,9 +16,18 @@
</body>
<script>
- Elm.fullscreen(Elm.Main, {
- initialTime: new Date().getTime()
- });
+ var timer = Elm.fullscreen(Elm.Main, {
+ initialTime: new Date().getTime(),
+ clickAway: []
+ });
+
+ timer.ports.clickPosition.subscribe(function(pos) {
+ const element = document.elementFromPoint(pos.x, pos.y);
+ if(element.nodeName != 'BUTTON') {
+ timer.ports.clickAway.send([]);
+ }
+ });
+
</script>
</html>