window.baseGetSpaceCookieValue = window.baseGetSpaceCookieValue || function (e) { var t = document.cookie.match(new RegExp("(^| )" + e + "=([^;]*)(;|$)")); return null != t ? t[2] : null; }; var vIsUidLogin = baseGetSpaceCookieValue("uid"); var IsLogin = baseGetSpaceCookieValue("hwsso_uniportal"); var IsBackLogin = baseGetSpaceCookieValue("login_uid"); var langs = window.location.pathname.split('/')[1]; if ((IsLogin != null && IsLogin != "undefined" && IsLogin != "") || (IsBackLogin != null && IsBackLogin != "undefined" && IsBackLogin != "") || (vIsUidLogin != null && vIsUidLogin != "undefined" && vIsUidLogin != "")) { var userStatusUrl = "//" + location.host + "/" + langs + "/user"; if (userStatusUrl != "") { userStatusUrl += "?action=userstate¤tUrl=" + encodeURI(window.location); $.ajax({ url: userStatusUrl, dataType: 'json', cache: false, async: true, success: function (data) { if (data.Stats || data.user) { // let userInfo = data.user; // let { // userType // } = userInfo; // let userTypeAccounts = ['WX', 'HWE', 'HT']; // if (userTypeAccounts.includes(userType)) {} else { // if (window.location.pathname.indexOf('-partner') == -1) { // window.location.href = encodeURI(window.location.pathname) + '-partner' + window.location.search; // } // } return; } else { window.location.href = '/en/account/Login2?redirect=' + encodeURIComponent(window.location.href) + '&lang=' + langs; }; } }); } } else { window.location.href = '/en/account/Login2?redirect=' + encodeURIComponent(window.location.href) + '&lang=' + langs; }; $("link[href*='bootstrap']").remove();