Sha256: 01d0069a142e9258618ecb0af5b2a8ac0b32daf9a45f0ed1a99d25736077d36d
Contents?: true
Size: 1016 Bytes
Versions: 126
Compression:
Stored size: 1016 Bytes
Contents
window.define = previousDefine; // This'll be our "error service" for hallway if (isHallway()) { $( document ).ajaxError(function( event, jqxhr, settings, thrownError ) { if ( jqxhr.status === 401) { fetch("https://" + window.location.host + "/apps/v1/navigation").then(response => { if (response.status === 401) { deleteAllCookies(); window.location.href = '/apps/newlogin.do?retURL=' + window.location.pathname; } }); } }); } function isHallway() { var regex = new RegExp("(?<=\\/)services\\/.*"); if (regex.test(window.location.pathname)) { return window.location.pathname.match(regex)[0] } return null; } function deleteAllCookies() { var cookies = document.cookie.split(";"); for (var i = 0; i < cookies.length; i++) { var cookie = cookies[i]; var eqPos = cookie.indexOf("="); var name = eqPos > -1 ? cookie.substr(0, eqPos) : cookie; document.cookie = name + "=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/"; } }
Version data entries
126 entries across 126 versions & 1 rubygems