1// Make sure that these properties exist on the window. 2window.googlefc = window.googlefc || {}; 3window.googlefc.ccpa = window.googlefc.ccpa || {}; 4window.googlefc.callbackQueue = window.googlefc.callbackQueue || []; 5 6// This decides whether to show the ad recovery message. 7// It must go before the FC (fundingchoicemessages) tag in ad_blocker_recovery.html. 8// eslint-disable-next-line no-undef 9googlefc.controlledMessagingFunction = (message) => { 10 // only show the ad recovery message if a user opens a new tab/window, 11 // when the exited_recovery_message sessionStorage variable is not there 12 if (sessionStorage.getItem('exited_recovery_message')) { 13 message.proceed(false); // don't show the ad recovery message 14 } else { 15 message.proceed(true); // show the ad recovery message 16 } 17}; 18 19// The callbackQueue allow us to run code after data is ready. 20// Here we use it to see if a user has exited out of the recovery message 21// eslint-disable-next-line no-undef 22googlefc.callbackQueue.push({ 23 'AD_BLOCK_DATA_READY': () => { // when ad blocking data is ready 24 // eslint-disable-next-line no-undef 25 if (googlefc.getAdBlockerStatus() !== googlefc.AdBlockerStatusEnum.NO_AD_BLOCKER) { // if the user has an ad blocker 26 $('.fc-close-icon').on('click', function() { // when a user exits out of the recovery message 27 sessionStorage.setItem('exited_recovery_message', true); // set the exited_recovery_message sessionStorage variable 28 $('body').addClass('allow-scrolling'); // add the allow-scrolling class to the body to fix the lytics slide out 29 }); 30 } 31 }, 32});
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.