'); } if ("" != "1") disable_right_click(); jq = jQuery.noConflict() let gateway = "https://mms.kinaway.com.au/gateway"; if (localStorage.getItem("LOCAL") === "TRUE") { gateway = "https://kinaway/gateway"; } else if (localStorage.getItem("LOCAL") === "LOCALHOST") { gateway = "https://localhost:8081/gateway"; } function loginRequest() { let searchArgs = window.location.search.replace(/^\?/, "").split("+").filter(v => !(v.includes("SID=") || v.includes("FID="))); if (searchArgs.includes("OLD_FORM=1")) { localStorage.setItem("NEW_LOGIN", "0"); } if (searchArgs.includes("NEW_FORM=1")) { localStorage.setItem("NEW_LOGIN", "1"); } if (searchArgs.includes("FORCE=1")) { let newURL = gateway + "/auth/sign-out"; console.log("sign-out:", newURL); window.location.href = newURL; return; } /* let newLoginForm = (Number(localStorage.getItem("NEW_LOGIN")) === 1) ? true : false; if (newLoginForm) { let newURL = gateway + "?" + searchArgs.filter(v => v).join("+").replaceAll(/BOPSID\=\d+/g, "").replaceAll(/^\++/g, ""); console.log("newLoginForm:", newURL); window.location.href = newURL; return; } */ jq(document).ready(function() { console.log("searchArgs:", searchArgs); if (searchArgs.includes("OLD_FORM=1")) { jq(".loginclass").show(); } else { let newURL = gateway + "/auth/guest?" + searchArgs.filter(v => v).join("+").replaceAll(/BOPSID\=\d+/g, "").replaceAll(/^\++/g, "") + window.location.hash; console.log("newLoginForm:", newURL, "current:", window.location.href); window.location.href = newURL; return; } }) } function zNewForm() { localStorage.setItem("NEW_LOGIN", "1"); if (!localStorage.getItem("REALM")) { // alert("Your account is not linked to a new login logic realm.\n\nYou have to login and logout using legacy method to enable the new logic."); } window.location.href = window.location.href.replace("OLD_FORM=1", ""); } loginRequest();