aboutsummaryrefslogtreecommitdiff
path: root/public/javascripts/elmLauncher.js
blob: ef5d86d5f6cb4a8151e4a4a9d6d50b9d98d38f7a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
Elm.fullscreen(Elm.Main, {
  signInError: getParameterByName('signInError'),
  initialTime: new Date().getTime(),
  translations: document.getElementById('messages').innerHTML
});

function getParameterByName(name) {
  name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
  var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
      results = regex.exec(location.search);
  return results && decodeURIComponent(results[1].replace(/\+/g, " "));
}