1 2function saveCookiePref(pref) { 3 localStorage.setItem('swm_cookies', pref); 4} 5 6function loadCookiePrefs() { 7 var pref = localStorage.getItem('swm_cookies'); 8 return pref; 9} 10 11$(document).ready(function() { 12 var $cookieBanner = $('.Site-cookies'); 13 var $reject = $('.btn-reject'); 14 var $accept = $('.btn-accept'); 15 16 var prefs = loadCookiePrefs(); 17 18 $reject.click(function() 19 { 20 $cookieBanner.removeClass('is-active'); 21 saveCookiePref('false') 22 }) 23 $accept.click(function() 24 { 25 $cookieBanner.removeClass('is-active'); 26 saveCookiePref('true') 27 }) 28 29 if(prefs === null) { 30 setTimeout(function() 31 { 32 $cookieBanner.addClass('is-active'); 33 },4000); 34 } 35 36 37 });
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.