1window.addEventListener("load", function () { 2 var getTokenButtons = document.querySelectorAll('.cookies_get_token'); 3 4 if (getTokenButtons.length) { 5 getTokenButtons.forEach(getTokenButton => { 6 getTokenButton?.addEventListener('click', function (event) { 7 // Block default click 8 event.preventDefault(); 9 if (typeof axeptioSDK !== undefined) { 10 // wordk too : axeptioSDK.userPreferencesManager.settings.token 11 window.alert('Token : ' + axeptioSDK.settings.token); 12 } 13 }, false); 14 }); 15 } 16 17 var openPopinButtons = document.querySelectorAll('.cookies_open_popin_button'); 18 19 if (openPopinButtons.length) { 20 openPopinButtons.forEach(openPopinButton => { 21 openPopinButton?.addEventListener('click', function (event) { 22 // Block default click 23 event.preventDefault(); 24 if (typeof showAxeptioButton !== undefined) { 25 showAxeptioButton(); 26 } 27 }, false); 28 }); 29 } 30 31 var openPopins = document.querySelectorAll('.cookies_open_popin'); 32 33 if (openPopins.length) { 34 openPopins.forEach(openPopin => { 35 openPopin?.addEventListener('click', function (event) { 36 // Block default click 37 event.preventDefault(); 38 if (typeof axeptioSDK !== undefined) { 39 axeptioSDK.openCookies(); 40 } 41 }, false); 42 }); 43 } 44 45 document.querySelectorAll('[data-vendor-consent]').forEach(element => { 46 element.addEventListener('click', function (event) { 47 event.preventDefault(); 48 const authorizeVendorElement = event.target.closest('[data-vendor-consent]'); 49 const vendor = authorizeVendorElement.getAttribute('data-vendor-consent'); 50 const reloadAfter = authorizeVendorElement.getAttribute('data-reload') || false; 51 if (typeof axeptioSDK !== undefined && vendor) { 52 axeptioSDK.requestConsent(vendor); 53 if (reloadAfter) { 54 // Listen axeptio changes to reload page to load the service 55 void 0 === window._axcb && (window._axcb = []); 56 window._axcb.push(function (axeptio) { 57 axeptio.on("cookies:complete", function (choices) { 58 if (typeof choices[vendor] !== undefined && choices[vendor]) { 59 window.location.reload(); 60 } 61 }); 62 }); 63 } 64 } 65 }); 66 }); 67 68});
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.