1/* 2 3 //////////////////////////////////////////////////////////////////////// 4 //// 5 //// +----------------------------------------------------------------- 6 //// | 7 //// | assets/js/ 8 //// | 9 //// | cookies.js 10 //// | 11 //// +----------------------------------------------------------------- 12 //// 13 //////////////////////////////////////////////////////////////////////// 14 15*/ 16 17 18 ///////////////////////////////////////////////////////// 19 // 20 // FUNCTION: BAS_set_cookie 21 // 22 ///////////////////////////////////////////////////////// 23 24 function BAS_set_cookie ( cookie_name, cookie_value, cookie_days ) { 25 26 var today = new Date(); 27 28 var cookie_expiration_date = new Date(); 29 30 cookie_expiration_date.setDate( today.getDate() + cookie_days ); 31 32 var cookie_expiration_utc = cookie_expiration_date.toUTCString(); 33 34 var new_cookie = 35 36 cookie_name + '=' + cookie_value + 37 '; expires=' + cookie_expiration_utc + 38 '; path=/'; 39 40 document.cookie = new_cookie; 41 } 42 43 44 ///////////////////////////////////////////////////////// 45 // 46 // FUNCTION: BAS_get_cookie 47 // 48 ///////////////////////////////////////////////////////// 49 50 function BAS_get_cookie ( cookie_name ) { 51 52 // logic here is from Stack Overflow, confirmed by other sources 53 54 var prefaced_cookie = "; " + document.cookie; 55 56 var cookie_bits = prefaced_cookie.split( '; ' + cookie_name + '=' ); 57 58 if (cookie_bits.length === 2) { 59 60 var cookie_bit = cookie_bits.pop().split( ';' ).shift(); 61 62 return cookie_bit; 63 } 64 65 // if no cookie found 66 67 return null; 68 } 69 70/* 71function setCookie(name, value, days) { 72 var d = new Date; 73 d.setTime(d.getTime() + 1*60*60*1000*days); 74 document.cookie = name + "=" + value + ";path=/;expires=" + d.toGMTString(); 75} 76function getCookie(name) { 77 var v = document.cookie.match('(^|;) ?' + name + '=([^;]*)(;|$)'); 78 return v ? v[2] : null; 79} 80 81window.onbeforeunload = function() { 82 setCookie('popup', '', -1); 83 return ''; 84}; 85 86 87 88if (document.getElementById("cookie-popup")) 89{ 90 if(getCookie('popup')!="1") 91 { 92 document.getElementById("cookie-popup").style.display = "block"; 93 } 94 else 95 { 96 document.getElementById("cookie-popup").style.display = "none"; 97 } 98} 99jQuery(document).on('click', '.css-close', function(){ 100 setCookie('popup', '1', 1); 101}); 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.