aboutsummaryrefslogtreecommitdiff
path: root/src/client/js
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/js')
-rw-r--r--src/client/js/main.js20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/client/js/main.js b/src/client/js/main.js
index 296600e..839c33a 100644
--- a/src/client/js/main.js
+++ b/src/client/js/main.js
@@ -1,10 +1,16 @@
// Remove query params
-window.history.pushState({html: document.documentElement.innerHTML, pageTitle: document.title}, '', location.pathname);
+window.history.pushState(
+ {
+ html: document.documentElement.innerHTML,
+ pageTitle: document.title
+ },
+ '',
+ document.location.pathname
+);
-Elm.fullscreen(Elm.Main, {
- initialTime: new Date().getTime(),
- translations: document.getElementById('messages').innerHTML,
- conf: document.getElementById('conf').innerHTML,
- initResult: document.getElementById('initResult').innerHTML,
- location: location.pathname
+var app = Elm.Main.fullscreen({
+ time: new Date().getTime(),
+ translations: JSON.parse(document.getElementById('translations').innerHTML),
+ conf: JSON.parse(document.getElementById('conf').innerHTML),
+ result: JSON.parse(document.getElementById('result').innerHTML)
});