1(function dyConsent() { 2 ("use strict"); 3 4 // Set DY Consent on page load. 5 window.DY = window.DY || {}; 6 7 // Immediately execute code that checks if user has cookie from previous visit. 8 DY.userActiveConsent = document.cookie.indexOf("personalization_storage=granted") !== -1 9 ? { accepted: true } 10 : { accepted: false }; 11 12 // Listen for our consent cookies to be set. 13 window.addEventListener("mskConsentCookiesSet", (e) => { 14 window.DY = window.DY || {}; 15 16 // cassie cookie consent (set as a dependency) needs to run first and set the personalization_storage cookie 17 const personalizationConsentGranted = 18 document.cookie.indexOf("personalization_storage=granted") !== -1; 19 20 DY.userActiveConsent = personalizationConsentGranted 21 ? { accepted: true } 22 : { accepted: false }; 23 24 // Manually set/update in case DY scripts run before DY.userActiveConsent variable is set. 25 // TO DO: If we can get execution order correct, try removing this, so we don't 26 // unnecessarily call this function on every page load. 27 if (typeof DYO === "object" && DYO !== null) { 28 if (personalizationConsentGranted) { 29 DYO.ActiveConsent.updateConsentAcceptedStatus(true); 30 } else { 31 DYO.ActiveConsent.updateConsentAcceptedStatus(false); 32 } 33 } 34 }); 35})();
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.