1(() => { 2 function initWeatherTabs() { 3 const tabs = document.querySelectorAll('[data-weather-tab]'); 4 const panels = document.querySelectorAll('[data-weather-panel]'); 5 if (!tabs.length || !panels.length) return; 6 7 tabs.forEach(tab => { 8 tab.addEventListener('click', () => { 9 const target = tab.getAttribute('data-weather-tab'); 10 11 tabs.forEach(btn => { 12 btn.classList.remove('is-active'); 13 btn.setAttribute('aria-selected', 'false'); 14 }); 15 16 panels.forEach(panel => { 17 panel.classList.remove('is-active'); 18 }); 19 20 tab.classList.add('is-active'); 21 tab.setAttribute('aria-selected', 'true'); 22 23 const targetPanel = document.querySelector(`[data-weather-panel="${target}"]`); 24 if (targetPanel) { 25 targetPanel.classList.add('is-active'); 26 } 27 }); 28 }); 29 } 30 31 document.addEventListener('DOMContentLoaded', initWeatherTabs); 32})();
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.