PageSourceSearch

https://reutersagency.com/hubfs/hub_generated/module_assets/1/1837…/module_RA_Tabs_Vertical.min.js

js reutersagency.com collected 2026-10-02 02:26:00 UTC 2,248 bytes, 2 lines download raw bytes

1var module_183796241052=void document.addEventListener("DOMContentLoaded",function(){const container=document.querySelector("#vertical-widget_1750786256052");if(!container)return;const buttons=container.querySelectorAll(".tab-button"),contents=container.querySelectorAll(".tab-content");function activateTabByContent(){const activeContent=container.querySelector(".tab-content.active");if(activeContent){const targetTabId=activeContent.id;buttons.forEach(btn=>{btn.getAttribute("data-tab")===targetTabId?btn.classList.add("active"):btn.classList.remove("active")})}}buttons.forEach(button=>{button.addEventListener("click",function(){const targetTab=this.getAttribute("data-tab"),targetContent=document.getElementById(targetTab);if(window.innerWidth<=768&&this.classList.contains("active"))return this.classList.remove("active"),void targetContent.classList.remove("active");buttons.forEach(btn=>{btn.classList.remove("active"),btn.setAttribute("aria-selected","false"),btn.setAttribute("tabindex","-1")}),contents.forEach(content=>{content.classList.remove("active"),content.setAttribute("hidden","true")}),this.classList.add("active"),this.setAttribute("aria-selected","true"),this.setAttribute("tabindex","0"),targetContent&&(targetContent.classList.add("active"),targetContent.removeAttribute("hidden"))})}),container.querySelector('[role="tablist"]').addEventListener("keydown",e=>{const key=e.key,currentIndex=Array.from(buttons).indexOf(document.activeElement);if(-1===currentIndex)return;let nextIndex=null;if("ArrowDown"===key)e.preventDefault(),nextIndex=(currentIndex+1)%buttons.length;else if("ArrowUp"===key)e.preventDefault(),nextIndex=(currentIndex-1+buttons.length)%buttons.length;else if("Enter"===key||" "===key)return e.preventDefault(),void document.activeElement.click();if(null!==nextIndex){const nextButton=buttons[nextIndex];current=buttons[currentIndex],target=nextButton,current.setAttribute("tabindex","-1"),target.setAttribute("tabindex","0"),target.focus()}var current,target}),window.addEventListener("resize",activateTabByContent),activateTabByContent()});
2//# sourceURL=https://19565931.fs1.hubspotusercontent-na1.net/hubfs/19565931/hub_generated/module_assets/1/183796241052/1760364434890/module_RA_Tabs_Vertical.js

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.