diff options
author | Joris Guyonvarch | 2015-07-19 20:24:54 +0200 |
---|---|---|
committer | Joris Guyonvarch | 2015-07-19 20:24:54 +0200 |
commit | a40c4825996c90d107901b0d71162f9356f1395a (patch) | |
tree | 6fea2cdaf18ebc181b2ff60c929970d71abc3a15 /public | |
parent | 3aeb5db40424863039651d10593c1c0be49efd7b (diff) |
Showing login token error message in the UI
Diffstat (limited to 'public')
-rw-r--r-- | public/javascripts/elmLauncher.js | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/public/javascripts/elmLauncher.js b/public/javascripts/elmLauncher.js index 52b1087..c4a00b3 100644 --- a/public/javascripts/elmLauncher.js +++ b/public/javascripts/elmLauncher.js @@ -1 +1,10 @@ -Elm.fullscreen(Elm.Main); +Elm.fullscreen(Elm.Main, { + signInError: getParameterByName('signInError') +}); + +function getParameterByName(name) { + name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]"); + var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"), + results = regex.exec(location.search); + return results && decodeURIComponent(results[1].replace(/\+/g, " ")); +} |