From a40c4825996c90d107901b0d71162f9356f1395a Mon Sep 17 00:00:00 2001 From: Joris Guyonvarch Date: Sun, 19 Jul 2015 20:24:54 +0200 Subject: Showing login token error message in the UI --- public/javascripts/elmLauncher.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'public/javascripts') 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, " ")); +} -- cgit v1.2.3