1function setCookie(cname, cvalue, exdays) { 2 var d = new Date(); 3 d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1000); 4 var expires = "expires=" + d.toUTCString(); 5 document.cookie = cname + "=" + cvalue + ";" + expires; 6} 7 8function getCookie(cname) { 9 var name = cname + "="; 10 var decodedCookie = decodeURIComponent(document.cookie); 11 var ca = decodedCookie.split(";"); 12 for (var i = 0; i < ca.length; i++) { 13 var c = ca[i]; 14 while (c.charAt(0) == " ") { 15 c = c.substring(1); 16 } 17 if (c.indexOf(name) == 0) { 18 return c.substring(name.length, c.length); 19 } 20 } 21 return ""; 22} 23 24if (Liferay.ThemeDisplay.isSignedIn() && GESTIONE_PROFILO_UTENTE === "true") { 25 let cookieName = Liferay.ThemeDisplay.getUserId() + "_credentials_checked"; 26 let credentialsCookie = getCookie(cookieName); 27 if (credentialsCookie == "") { 28 setCookie(cookieName, "checked", 1); 29 $.get({ 30 url: "/smart-portal-manager/api/service/confermaMail", 31 success: function (data) { 32 if (data.mailToConfirm == 1) { 33 window.location.href = 34 Liferay.ThemeDisplay.getPathContext() + "/gestione-profilo-utente"; 35 } else { 36 $.get({ 37 url: "/smart-portal-manager/api/service/checkPassword", 38 success: function (data) { 39 if (data != "") { 40 window.location.href = 41 Liferay.ThemeDisplay.getPathContext() + 42 "/gestione-profilo-utente"; 43 } 44 }, 45 }); 46 } 47 }, 48 }); 49 } 50} 51 52if (getCookie("cookiebar") == "") { 53 $("#cookiebar").addClass("show"); 54}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.