https://teflinstitute.com/wp-content/themes/teflinstitute/assets/js/CookieServices.js?ver=1790243612
1const CookieService = { 2 setCookie(name, value, days, path = '/', secure = true, sameSite = 'Lax') { 3 if (this.getCookie(name) !== null) { 4 console.log('Cookie with the name ' + name + ' already exists.'); 5 return; 6 } 7 8 let expires = ''; 9 if (days) { 10 const date = new Date(); 11 date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000)); 12 expires = '; expires=' + date.toUTCString(); 13 } 14 const secureFlag = secure ? '; Secure' : ''; 15 const sameSiteFlag = '; SameSite=' + sameSite; 16 document.cookie = name + '=' + encodeURIComponent(JSON.stringify(value)) + expires + '; path=' + path + secureFlag + sameSiteFlag; 17 }, 18 getCookie(name) { 19 const cookies = document.cookie.split(';'); 20 for (const cookie of cookies) { 21 if (cookie.trim().indexOf(name + '=') === 0) { 22 try { 23 return JSON.parse(decodeURIComponent(cookie.split('=')[1])); 24 } catch (error) { 25 return null; 26 } 27 } 28 } 29 return null; 30 } 31};
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.