1function hideBanner() { 2 document.getElementById('cookie-consent-banner').style.display = 'none'; 3 } 4 5 6 7 if(localStorage.getItem('consentMode') === null) { 8 9 document.getElementById('btn-accept-all').addEventListener('click', function() { 10 setConsent({ 11 ad_storage: false, 12 analytics: true, 13 personalization: false, 14 functionality: true, 15 security: true 16 }); 17 hideBanner(); 18 }); 19 document.getElementById('btn-accept-necessary').addEventListener('click', function() { 20 setConsent({ 21 ad_storage: false, 22 analytics: false, 23 personalization: false, 24 functionality: true, 25 security: true 26 }); 27 hideBanner(); 28 }); 29 document.getElementById('cookie-consent-banner').style.display = 'block'; 30 } 31 32 function setConsent(consent) { 33 const consentMode = { 34 'functionality_storage': consent.functionality ? 'granted' : 'denied', 35 'security_storage': consent.security ? 'granted' : 'denied', 36 'ad_storage': consent.ad_storage ? 'granted' : 'denied', 37 'analytics_storage': consent.analytics ? 'granted' : 'denied', 38 'personalization_storage': consent.personalization ? 'granted' : 'denied', 39 }; 40 gtag('consent', 'update', consentMode); 41 localStorage.setItem('consentMode', JSON.stringify(consentMode)); 42 } 43 44 window.dataLayer = window.dataLayer || []; 45 function gtag() { 46dataLayer.push(arguments); 47 } 48 if(localStorage.getItem('consentMode') === null){ 49 gtag('consent', 'update', { 50 'ad_storage': 'denied', 51 'analytics_storage': 'denied', 52 'personalization_storage': 'denied', 53 'functionality_storage': 'denied', 54 'security_storage': 'denied', 55 56 }); 57 } else { 58 gtag('consent', 'update', JSON.parse(localStorage.getItem('consentMode'))); 59 }
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.