1/** 2 * ======= * 3 * * 4 * DEBUG * 5 * * 6 * ======= * 7 */ 8 9if( typeof l === 'undefined' ) { 10 function l(v) { 11 console.log(v) 12 } 13} 14 15if( typeof t === 'undefined' ) { 16 function t(v) { 17 console.table(v) 18 } 19} 20 21/** 22 * ===================== * 23 * * 24 * GESTION DES COOKIES * 25 * * 26 * ===================== * 27 */ 28 29 30if( typeof setCookie === 'undefined' ) { 31 function setCookie(cname, cvalue, exdays) { 32 const d = new Date(); 33 d.setTime(d.getTime() + (exdays*24*60*60*1000)); 34 let expires = "expires="+ d.toUTCString(); 35 document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/"; 36 } 37} 38 39if( typeof getCookie === 'undefined' ) { 40 function getCookie(cname) { 41 let name = cname + "="; 42 let decodedCookie = decodeURIComponent(document.cookie); 43 let ca = decodedCookie.split(';'); 44 for(let i = 0; i <ca.length; i++) { 45 let c = ca[i]; 46 while (c.charAt(0) == ' ') { 47 c = c.substring(1); 48 } 49 if (c.indexOf(name) == 0) { 50 return c.substring(name.length, c.length); 51 } 52 } 53 return ""; 54 } 55} 56 57/** 58 * ======= * 59 * * 60 * DATES * 61 * * 62 * ======= * 63 */ 64 65if (!Date.now) { /* Before ECMA-262 */ 66 Date.now = function now() { 67 return new Date().getTime(); 68 }; 69}
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.