aboutsummaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
authorJoris Guyonvarch2015-07-19 20:24:54 +0200
committerJoris Guyonvarch2015-07-19 20:24:54 +0200
commita40c4825996c90d107901b0d71162f9356f1395a (patch)
tree6fea2cdaf18ebc181b2ff60c929970d71abc3a15 /public
parent3aeb5db40424863039651d10593c1c0be49efd7b (diff)
Showing login token error message in the UI
Diffstat (limited to 'public')
-rw-r--r--public/javascripts/elmLauncher.js11
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, " "));
+}