1function _CMSTrackingEnabled(type) { var preferences = getCookie("privacy_cookie_status"); if (preferences && preferences.indexOf('allow' + type) != -1) { console.log(type + ' Tracking Enabled'); return true } if (preferences && preferences.indexOf('deny') > -1 || preferences.indexOf('unspecified') > -1) { console.log((type ? type + ' ' : '') + 'Tracking Disabled'); return false } return false }; function setCookie(cookieName, cookieValue, expires, path, domain, secure) { console.log('set ', cookieName); document.cookie = escape(cookieName) + '=' + escape(cookieValue) + (expires ? '; expires=' + expires.toGMTString() : '') + (path ? '; path=' + path : '') + (domain ? '; domain=' + domain : '') + '; SameSite=Lax' + (secure || location.protocol === 'https:' ? '; Secure' : '') }; function getCookie(cookieName) { var cookieValue = ''; var posName = document.cookie.indexOf(escape(cookieName) + '='); if (posName != -1) { var posValue = posName + (escape(cookieName) + '=').length; var endPos = document.cookie.indexOf(';', posValue); if (endPos != -1) { cookieValue = unescape(document.cookie.substring(posValue, endPos)) } else { cookieValue = unescape(document.cookie.substring(posValue)) } } return (cookieValue) }; $(document).ready(function () { var cccShown = getCookie("cookie_option_shown"); var prefSet = getCookie("privacy_cookie_status"); if (typeof addGTM == typeof Function) { addGTM(); console.log("addGTM defined and called") } else { console.log("addGTM not defined") } if (typeof dataLayer != 'undefined') { if (prefSet.indexOf('allowGA') != -1 && prefSet.indexOf('allowTP') != -1) { dataLayer.push({ 'event': 'all-cookies-consented' }) } else if (prefSet.indexOf('allowGA') != -1) { dataLayer.push({ 'event': 'ga-cookies-consented' }) } else if (prefSet.indexOf('allowTP') != -1) { dataLayer.push({ 'event': 'tp-cookies-consented' }) } else if (prefSet.indexOf('denyGA') != -1 && prefSet.indexOf('denyTP') != -1) { dataLayer.push({ 'event': 'no-cookies-consented' }) } } if (cccShown == 'active' || prefSet || window.location.pathname == '/help/privacy-help/' || window.location.pathname == '/help/cookie-details/') { $('#cookies').hide(); $('#ccc-notify').hide(); $('body').addClass('cookie-bar-hidden') } else { $('#cookies').hide(); $('#ccc-notify').show(); $('#ccc-notify').removeClass('hidden'); $('body').addClass('cookie-bar-visible') } $('[data-trigger="cookies"]').on('click', function (event) { event.preventDefault(); manageSettings() }); if ($("body").hasClass('logged-in') || prefSet.indexOf('allowTP') != -1) { loadFrames() } }); function dismissCookieBar() { setCookie("cookie_option_shown", 'active', "", "/"); $('body').removeClass('cookie-bar-visible'); $('body').addClass('cookie-bar-hidden'); $('#ccc-notify').hide() } function dismissCookiePref() { setCookie("cookie_option_shown", 'active', "", "/"); $('#cookies').hide() } function manageSettings(opener) { if (opener) { $('#' + opener).hide() }; var cookPref = getCookie("privacy_cookie_status"); if (cookPref.indexOf('allowGA') != -1) { $('#cms-google-analytics-cookies').attr('checked', true); $('#cms-google-analytics-cookies').prop('checked', true) } else { $('#cms-google-analytics-cookies').attr('checked', false); $('#cms-google-analytics-cookies').prop('checked', false) } if (cookPref.indexOf('allowTP') != -1) { $('#cms-third-party-cookies').attr('checked', true); $('#cms-third-party-cookies').prop('checked', true) } else { $('#cms-third-party-cookies').attr('checked', false); $('#cms-third-party-cookies').prop('checked', false) } $('#cookies').show(); $('#overlay').fadeIn(); $('#overlay').on('click', function (event) { event.preventDefault(); return false }); $('#cookies').removeClass('hidden'); $('#cookies').css('display', 'block'); $('html, body').animate({ scrollTop: ($('#cookies').offset().top) + -40 }, 500) } function manageCookies(action) { var ckTP, ckGA = ''; ckTP = ($('#cms-third-party-cookies').prop('checked')); ckGA = ($('#cms-google-analytics-cookies').prop('checked')); var cookiePref = ''; if (action == 'enable') { cookiePref = 'allowTP allowGA' } else { if (ckTP == 'checked' || ckTP === true) { cookiePref += 'allowTP' } else { cookiePref += 'denyTP' } if (ckGA == 'checked' || ckGA === true) { cookiePref += ' allowGA' } else { cookiePref += ' denyGA' } } console.log(" ThirdParty : " + ckTP + ' GA : ' + ckGA + ' Pref Cookie ' + co
1okiePref); var now = new Date(); var expires = new Date(now.getTime() + 1000 * 60 * 60 * 24 * 365 * 2); setCookie("privacy_cookie_status", cookiePref, expires, "/"); var randomnumber = Math.floor(Math.random() * 1000000); var marker = '/wp-content/themes/ibblaw/assets/images/blank.gif?' + cookiePref + '&dt=' + randomnumber; $.ajax({ url: marker }); if (typeof addGTM == typeof Function) { addGTM() } if (typeof dataLayer == 'undefined') { $('#ccc-notify').append('<img src="' + marker + '"/>') } if (typeof dataLayer != 'undefined') { if (cookiePref.indexOf('allowGA') != -1 && cookiePref.indexOf('allowTP') != -1) { dataLayer.push({ 'event': 'all-cookies-consented' }) } else if (cookiePref.indexOf('allowGA') != -1) { dataLayer.push({ 'event': 'ga-cookies-consented' }) } else if (cookiePref.indexOf('allowTP') != -1) { dataLayer.push({ 'event': 'tp-cookies-consented' }) } else if (cookiePref.indexOf('denyGA') != -1 && cookiePref.indexOf('denyTP') != -1) { dataLayer.push({ 'event': 'no-cookies-consented' }) } } else { window.location.reload() } if (cookiePref.indexOf('deny') != -1) { removeCookies() } $(".cms-cookie-reload").each(function () { var tmp = $(this).html(); $(this).html(''); $(this).html(tmp) }); $('#cookies').hide(); $('#ccc-notify').hide(); $('#overlay').fadeOut(); $('#overlay').on('click', function (event) { $('.modal').trigger('closeModal') }); if ($("body").hasClass('adminMode') || cookiePref.indexOf('allowTP') != -1) { loadFrames() } } function loadFrames() { console.log('loadFrames called : count ' + $('iframe').not('[data-cms-cookie-src=""]').length); $('iframe').not('[data-cms-cookie-src=""]').each(function () { var src = $(this).attr('data-cms-cookie-src'); console.log('Frame found - setting src to ' + src); if (src) { $(this).attr('src', src) } }) } function removeCookies() { var cookPref = getCookie("privacy_cookie_status"); var ckTP, ckGA = ''; ckGA = (cookPref.indexOf('allowGA') != -1 ? true : false); ckTP = (cookPref.indexOf('allowTP') != -1 ? true : false); console.log('In remove cookies : GA Allowed? ' + ckGA + ' Third-party allowed ? ' + ckTP); var cookies = document.cookie.split("; "); for (var c = 0; c < cookies.length; c += 1) { var d = window.location.hostname.split("."); var cookName = cookies[c].split(";")[0].split("=")[0]; if (cookName.indexOf('wordpress_') != -1 || cookName.indexOf('wp-') != -1 || cookName == 'privacy_cookie_status') { console.log('Protected Cookie : ' + cookName); continue } if (ckGA) { if (cookName.startsWith('_ga') || cookName.startsWith('_gid') || cookName.startsWith('_utm')) { console.log('Protected Analytics Cookie : ' + cookName); continue } } if (ckTP) { if (!(cookName.startsWith('_ga') || cookName.startsWith('_gid') || cookName.startsWith('_utm'))) { console.log('Protected Third-party Cookie : ' + cookName); continue } } console.log('Cookie will be trashed : ' + cookName); while (d.length > 0) { var cookieBase = encodeURIComponent(cookName) + '=; expires=Thu, 01-Jan-1970 00:00:01 GMT; domain=' + d.join('.') + ' ;path='; var p = location.pathname.split('/'); document.cookie = cookieBase + '/'; while (p.length > 0) { document.cookie = cookieBase + p.join('/'); p.pop() }; d.shift() } } }
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.