1(function( $ ) { 2 3 let validator = { 4 set: function( obj, prop, value ) { 5 if ( typeof value.event !== 'undefined' && value.event == 'gtm.load' ) { 6 window.dataLayer.push( { 'event' : 'Cookie Consent', 'cookie-consent-time-milliseconds': localStorage.getItem( 'send_cookie_consent' ) } ); 7 localStorage.removeItem( 'send_cookie_consent' ); 8 } 9 obj[prop] = value; 10 return true; 11 } 12 }; 13 14 $(function() { 15 $( document ).ready( function() { 16 window.dataLayer = window.dataLayer || []; 17 var result = window.dataLayer.find( obj => { return obj['property-ua-tracking-id'] !== undefined; } ); 18 if ( typeof( result ) === 'undefined' ) { console.log( 'GA/UA not installed.' ); return; } 19 if ( localStorage.getItem( 'tibrrCookieConsent' ) === null ) { window[ 'ga-disable-' + result['property-ua-tracking-id'] ] = true; } 20 setTimeout( function() { $( 'div.tibrr-cookie-consent-button > button', document ).each( function() { 21 $( this ).prop( 'id', 'tibrr-cookie-consent-button' ); 22 $( this ).on( 'click', function() { 23 window[ 'ga-disable-' + result['property-ua-tracking-id'] ] = false; 24 localStorage.setItem( 'send_cookie_consent', new Date().getTime() ); 25 Cookies.set( 'cookie_consent', true, { expires: 31, path: '/', secure: true, sameSite: 'strict' } ); // used by swingstep.tv - wordpress plugin 26 } ); 27 } ); }, 50 ); 28 var send_cookie_consent = localStorage.getItem( 'send_cookie_consent' ); 29 if ( send_cookie_consent !== null ) { 30 window.dataLayer = new Proxy( window.dataLayer, validator ); 31 } 32 } ); 33 } ); 34} )( jQuery );
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.