diff options
author | Joris | 2016-06-03 20:27:16 +0200 |
---|---|---|
committer | Joris | 2016-06-03 20:27:16 +0200 |
commit | 8e3a7bf1cb83bbb6e3dcd54308eefa52a29cd679 (patch) | |
tree | d6ba0985a534a0e2e317b1edb0d4c999119d87ff /src/client/js | |
parent | 3a88115d118f8256f3ff034dc359df42a9e4051c (diff) |
Migrate to elm 0.17
Diffstat (limited to 'src/client/js')
-rw-r--r-- | src/client/js/main.js | 20 |
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) }); |