X-Git-Url: https://git-public.kairo.at/?p=lantea.git;a=blobdiff_plain;f=js%2Fui.js;h=7526763ee78e184c467375382ee02881a5dd1e3f;hp=f451fbe52932ec53f900bcd15943431e99b49d76;hb=6ba597ed42a0ebbb340112ab1b9a8316dc8f26cd;hpb=a1565de42b662fbe8565825aaf2e5619fbb29ac0 diff --git a/js/ui.js b/js/ui.js index f451fbe..7526763 100644 --- a/js/ui.js +++ b/js/ui.js @@ -17,11 +17,6 @@ var gBackendURL = "https://backend.lantea.kairo.at"; var gAuthClientID = "lantea"; window.onload = function() { - if (/\/login\.html/.test(window.location)) { - // If we are in the login window, call a function to complete the process and don't do anything else here. - completeLoginWindow(); - return; - } gAction = document.getElementById("action"); gActionLabel = document.getElementById("actionlabel"); @@ -175,16 +170,6 @@ function prepareLoginButton(aCallback) { ); } -function completeLoginWindow() { - if (window.opener) { - window.opener.finishLogin(getParameterByName("code"), getParameterByName("state")); - window.close(); - } - else { - document.getElementById("logininfo").textContent = "You have called this document outside of the login flow, which is not supported."; - } -} - function finishLogin(aCode, aState) { if (aState == authData["state"]) { fetchBackend("login?code=" + aCode + "&state=" + aState + "&redirect_uri=" + encodeURIComponent(getRedirectURI()), "GET", null,