1// TODO: Fix later. 2/* eslint-disable no-unused-vars */ 3// TODO: Fix later. 4/* eslint-disable no-shadow */ 5/* eslint-disable sonarjs/cognitive-complexity */ 6/* eslint-disable xss/no-mixed-html */ 7/* eslint-disable no-undef */ 8/* eslint-disable guard-for-in */ 9/* eslint-disable no-restricted-syntax */ 10if (document.querySelectorAll('nav a.language-link').length) { 11 for (const id in document.querySelectorAll('nav a.language-link')) { 12 const switcher = document.querySelectorAll('nav a.language-link')[id]; 13 14 if (typeof switcher === 'object') { 15 $(switcher).on('click', (event) => { 16 const toast = $("div[data-rs-toast='language-switch']"); 17 if (toast.length) { 18 event.preventDefault(); 19 if (toast.hasClass('closable--closed')) { 20 toast.removeClass('closable--closed'); 21 toast.addClass('toast--active'); 22 } else { 23 toast.addClass('toast--active'); 24 } 25 26 const continueButton = $('#toast-cta-continue'); 27 const language = event.target.firstChild.nodeValue; 28 continueButton.attr('href', event.target.attributes.href.value); 29 continueButton.on('click', (event) => { 30 if (typeof window !== 'undefined' && window.dataLayer) { 31 window.dataLayer.push({ 32 eventCategory: 'Language Switch', 33 eventAction: language, 34 eventLabel: 'Filters Active', 35 event: 'eventTracker', 36 }); 37 } 38 }); 39 } 40 }); 41 } 42 } 43}
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.