'); } if ("" != "1") { // disable_right_click(); } jq = jQuery.noConflict() let gateway = "https://mms.kinaway.com.au/gateway/"; if (localStorage.getItem("LOCAL") === "KA") { gateway = "https://kinaway/gateway/"; } else if (localStorage.getItem("LOCAL") === "LOCALHOST") { gateway = "https://localhost/gateway/"; } else if (localStorage.getItem("LOCAL") === "BREWERY") { gateway = "https://testsdm.iclpl.ca/gateway/"; } function loginRequest() { let searchArgs = window.location.search .replace(/^\?/, "") .split("+").filter(v => v && (v.includes("PERSID=") || !(v.includes("SID=") || v.includes("BOPSID=") || v.includes("FID=")))); let hashArgs = window.location.hash .replace(/^\#/, "") .split("+").filter(v => v); 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; } jq(document).ready(function() { console.log("searchArgs:", searchArgs); console.log("hashArgs:", hashArgs); if (searchArgs.includes("OLD_FORM=1")) { jq(".loginclass").show(); } else { let newURL = gateway + "/auth/guest" + "?" + searchArgs.filter(v => v).join("+") + "#" + hashArgs.join("+"); 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();