1jQuery(document).ready(function($){ 2 3 var cookies = document.cookie.split(";"); 4 5 var euCookieSet = eucookielaw_data.euCookieSet; 6 var expireTimer = eucookielaw_data.expireTimer; 7 var scrollConsent = eucookielaw_data.scrollConsent; 8 var networkShareURL = eucookielaw_data.networkShareURL; 9 var isCookiePage = eucookielaw_data.isCookiePage; 10 var isRefererWebsite = eucookielaw_data.isRefererWebsite; 11 var deleteCookieUrl = eucookielaw_data.deleteCookieUrl; 12 var autoBlock = eucookielaw_data.autoBlock; 13 14 // Navigation Consent 15 if ( autoBlock == 0 && isRefererWebsite && document.cookie.indexOf('euCookie') < 0 ) { 16 euCookieConsent(); 17 } 18 19 // Scroll Consent 20 jQuery(window).scroll(function(){ 21 if ( autoBlock == 0 && scrollConsent > 0 && document.cookie.indexOf("euCookie") < 0 && !euCookieSet ) { 22 if (!isCookiePage && getCookie('euCookie') != "block" ) { 23 euCookieConsent(); 24 } 25 } 26 }); 27 28 // Accept Button 29 $('#pea_cook_btn, .eucookie').click(function() { 30 euCookieConsent(); 31 }); 32 33 if ( getCookie('euCookie') == "set" || euCookieSet == 1 ) { 34 $(".pea_cook_wrapper").fadeOut("fast"); 35 } 36 37 // Cookie-Control shortcode - REVOKE 38 $("#eu_revoke_cookies").click(function() { 39 deleteCookies(); 40 //createCookie( "block" ); 41 location.reload(); 42 }); 43 44 45 // Banner open / close 46 $("#fom").click(function() { 47 if( $('#fom').attr('href') === '#') { 48 $(".pea_cook_more_info_popover").fadeIn("slow"); 49 $(".pea_cook_wrapper").fadeOut("fast"); 50 } 51 }); 52 53 $("#pea_close").click(function() { 54 $(".pea_cook_wrapper").fadeIn("fast"); 55 $(".pea_cook_more_info_popover").fadeOut("slow"); 56 }); 57 58 // AUX Functions 59 function euCookieConsent() { 60 if (typeof euCookieConsentFilter === "function") { 61 euCookieConsentFilter(); 62 } 63 deleteCookies() 64 createCookie(); 65 if (autoBlock == 1) { 66 location.reload(); 67 } 68 } 69 70 function createCookie() { 71 var today = new Date(), expire = new Date(); 72 73 if (expireTimer > 0) { 74 expire.setTime(today.getTime() + (expireTimer * 24 * 60 * 60 * 1000) ); 75 cookiestring = "euCookie=set; "+networkShareURL+"expires=" + expire.toUTCString() + "; path=/"; 76 } else { 77 cookiestring = "euCookie=set; "+networkShareURL+"path=/"; 78 } 79 document.cookie = cookiestring; 80 $(".pea_cook_wrapper").fadeOut("fast"); 81 } 82 83 function getCookie(cname) { 84 var name = cname + "="; 85 var decodedCookie = decodeURIComponent(document.cookie); 86 var ca = decodedCookie.split(';'); 87 for(var i = 0; i <ca.length; i++) { 88 var c = ca[i]; 89 while (c.charAt(0) == ' ') { 90 c = c.substring(1); 91 } 92 if (c.indexOf(name) == 0) { 93 return c.substring(name.length, c.length); 94 } 95 } 96 return ""; 97 } 98 99 function deleteCookies() { 100 document.cookie.split(";").forEach(function(c) { document.cookie = c.replace(/^ +/, "").replace(/=.*/, "=;expires=" + new Date().toUTCString() + ";path=/"); }); 101 window.location = window.location; 102 } 103});
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.