1function checkCookie(cookieName) { 2 // Split cookies by semicolon and trim whitespace 3 var cookies = document.cookie.split(";").map((cookie) => cookie.trim()); 4 5 // Loop through cookies to find the one we're looking for 6 for (var i = 0; i < cookies.length; i++) { 7 var cookie = cookies[i]; 8 // Check if this cookie starts with the name we're looking for 9 if (cookie.indexOf(cookieName + "=") === 0) { 10 return true; // Cookie found 11 } 12 } 13 return false; // Cookie not found 14} 15 16function setCookie(name, value, days) { 17 let expires = ""; 18 if (days) { 19 let date = new Date(); 20 date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000); 21 expires = "; expires=" + date.toUTCString(); 22 } 23 document.cookie = name + "=" + (value || "") + expires + "; path=/"; 24} 25 26function getCookieValue(name) { 27 const value = `; ${document.cookie}`; 28 const parts = value.split(`; ${name}=`); 29 if (parts.length === 2) return parts.pop().split(";").shift(); 30} 31 32const getCookies = async () => 33 $.ajax({ 34 url: ajax_object.ajax_url, 35 type: "POST", 36 data: { 37 action: "fetch_cookies", 38 }, 39 success: (response) => response, 40 error: (error) => false, 41 }); 42 43const getConsents = async (uuid) => 44 $.ajax({ 45 url: ajax_object.ajax_url, 46 type: "POST", 47 data: { 48 action: "fetch_consents", 49 uuid, 50 }, 51 success: (response) => response, 52 error: (error) => false, 53 });
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.