diff options
author | stuebinm | 2021-03-07 18:37:10 +0100 |
---|---|---|
committer | stuebinm | 2021-03-07 18:37:10 +0100 |
commit | 8b3ca704c66d7815e6f932e92a493f9aae44d74b (patch) | |
tree | 6cb42002509a116b66b66388637e6b6ad1d600a5 /picarones-elm/index.html | |
parent | 090041fadec2e2896c3b82ef518096313d452c13 (diff) |
Load slides from url given in uri fragment
Syntax is: https://domain-to-app#<prefix-for-slides>#<number-of-slides>
Slides must be .png image files numbered as 01.png, 02.png ...
Diffstat (limited to 'picarones-elm/index.html')
-rw-r--r-- | picarones-elm/index.html | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/picarones-elm/index.html b/picarones-elm/index.html index 66fe158..4fe72c7 100644 --- a/picarones-elm/index.html +++ b/picarones-elm/index.html @@ -10,8 +10,11 @@ <body> <div id="elm"></div> <script> + let args = location.hash.split("#").slice(1); + var app = Elm.Main.init({ - node: document.getElementById('elm') + node: document.getElementById('elm'), + flags: [args[0], parseInt(args[1])] }); let ws = new WebSocket("ws://localhost:9160") |