X-Git-Url: https://git-public.kairo.at/?p=lantea.git;a=blobdiff_plain;f=js%2Floginwindow.js;h=cd8d7653ebb51d72cd5ccbb7c3051b807e0388bb;hp=ebbdde4f7f840a088e74c9fbd0f0def0faa12b2b;hb=c7daa6aa40a79ad36dc7baf16e138aff467c6aa0;hpb=6ba597ed42a0ebbb340112ab1b9a8316dc8f26cd diff --git a/js/loginwindow.js b/js/loginwindow.js index ebbdde4..cd8d765 100644 --- a/js/loginwindow.js +++ b/js/loginwindow.js @@ -17,3 +17,11 @@ window.onload = function() { document.getElementById("logininfo").textContent = "You have called this document outside of the login flow, which is not supported."; } } + +function getParameterByName(aName) { + // from http://stackoverflow.com/questions/901115/how-can-i-get-query-string-values-in-javascript + name = aName.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]"); + var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"), + results = regex.exec(location.search); + return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " ")); +}