1/** 2 * @class 3 * @function CookieBar 4 */ 5if (!customElements.get('cookie-notice')) { 6 class CookieBar extends HTMLElement { 7 constructor() { 8 super(); 9 } 10 11 connectedCallback() { 12 this.button = this.querySelector('.button-accept'); 13 if (Cookies.get('thb-north-cookiebar') !== 'hide') { 14 gsap.to(this, { 15 duration: 0.5, 16 opacity: '1', 17 y: '0%' 18 }); 19 } 20 this.setupEventListeners(); 21 } 22 23 setupEventListeners() { 24 25 this.button.addEventListener('click', () => { 26 Cookies.set('thb-north-cookiebar', 'hide', { 27 expires: 30 28 }); 29 gsap.to(this, { 30 duration: 0.5, 31 opacity: '0', 32 y: '100%' 33 }); 34 return false; 35 }); 36 37 } 38 } 39 customElements.define('cookie-notice', CookieBar); 40}
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.