https://www.credo-blattgold.de/plugins/xt_cookie_consent/javascrip…?96f7ee0291a5264a6d55882bad9b6560
1function xt_cookie_consent_accept(acceptAll, lifeTime, secure) 2{ 3 if(typeof secure === 'undefined' || secure === null || secure === "") secure = false; 4 5 let data = {}; 6 for (let cookieType in cookie_settings.topics) { 7 if (Object.prototype.hasOwnProperty.call(cookie_settings.topics, cookieType)) 8 { 9 let setVal = cookieType === 'FUNCTIONAL' ? true : acceptAll; 10 data[cookieType] = { "allowed": setVal }; 11 } 12 } 13 14 // expires 15 //let d = new Date(); 16 //d.setTime(d.getTime() + lifeTime); // in milliseconds 17 18 let cookie = {'max-age': lifeTime, 'SameSite' : 'Strict' } 19 if (secure) cookie.secure = true; 20 //xtSetCookie(COOKIE_CONSENT_COOKIE_NAME, btoa(JSON.stringify(data)), cookie); 21 xtSetCookie(COOKIE_CONSENT_COOKIE_NAME, JSON.stringify(data), cookie); 22 $('#cookie-consent').hide(); 23 processCookieConsentInitFunctions(); 24 //setTimeout(function() {window.location.reload()}, 100); 25} 26 27function xt_cookie_consent_init(themeId) 28{ 29 console.log('xt_cookie_consent_init'); 30 switch(themeId) 31 { 32 case 1: 33 break; 34 case 2: 35 let el = $('#cookie-consent').detach(); 36 // in xt_responsive template prepend to div[data-role="page"] 37 // adapt to your needs/template 38 if ($('div[data-role="page"]').length>0) $('div[data-role="page"]').prepend(el); 39 // in xt_grid template prepend to body 40 else $('body').prepend(el); 41 break; 42 default: 43 break; 44 } 45} 46 47function xt_cookie_consent_show() 48{ 49 $('#cookie-consent').show(); 50} 51 52function processCookieConsentInitFunctions() 53{ 54 console.log('processCookieConsentInitFunctions'); 55 if(typeof cookieConsentInitFunctions !== 'undefined') 56 { 57 console.log('cookieConsentInitFunctions', cookieConsentInitFunctions); 58 for (const fnc of cookieConsentInitFunctions) { 59 if (typeof window[fnc] === 'function') { 60 window[fnc](); 61 } else { 62 console.log('cookieConsentInitFunctions: window[' + fnc + '] not found'); 63 } 64 } 65 } 66 else 67 console.log('cookieConsentInitFunctions: cookieConsentInitFunctions not defined') 68} 69
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.