PageSourceSearch

https://buffalojackson.com/cdn/shop/t/187/assets/accessibility.js

js buffalojackson.com collected 2026-10-02 04:20:32 UTC 4,479 bytes, 2 lines download raw bytes

1document.addEventListener("DOMContentLoaded",function(){document.querySelectorAll(".faqAccordion > dt > button").forEach(function(button){button.addEventListener("click",function(){button.classList.remove("active")})});const backToTop=document.querySelector(".back-to-top");window.addEventListener("scroll",function(){window.scrollY>300?(backToTop.hidden=!1,backToTop.style.display="flex"):(backToTop.hidden=!0,backToTop.style.display="none")}),backToTop.addEventListener("click",function(){window.scrollTo({top:0,behavior:"smooth"}),setTimeout(function(){const main=document.querySelector("#MainContent");main&&(main.setAttribute("tabindex","-1"),main.focus({preventScroll:!0}))},500)}),document.querySelectorAll("a[href]").forEach(function(link){try{new URL(link.href,window.location.origin).hostname!==window.location.hostname&&link.setAttribute("aria-label",(link.textContent.trim()||"External link")+" - Opens an external website")}catch{}});let lastFocusedCartButton=null;const cartButton=document.querySelector(".cart_container .mini_cart"),cartPopup=document.querySelector("#cart-popup"),cartCloseButton=document.querySelector("#cart-popup .cart_content__title .cart-close");console.log("cartButton found:",cartButton),console.log("cartPopup found:",cartPopup),console.log("cartCloseButton found:",cartCloseButton),cartButton&&cartPopup&&(cartButton.addEventListener("click",function(){lastFocusedCartButton=this,console.log("CLICK EVENT FIRED"),console.log("lastFocusedCartButton set to:",lastFocusedCartButton),this.setAttribute("aria-expanded","true"),cartPopup.setAttribute("tabindex","-1"),setTimeout(function(){cartPopup.focus(),console.log("Focus moved to popup. Active element:",document.activeElement)},1e3)}),cartCloseButton&&cartCloseButton.addEventListener("click",function(event){event.preventDefault(),console.log("CLOSE CLICKED"),console.log("lastFocusedCartButton value at close time:",lastFocusedCartButton),cartButton.setAttribute("aria-expanded","false"),setTimeout(function(){cartButton.focus(),console.log("Tried to focus cartButton. Active element now:",document.activeElement)},100)}),document.querySelectorAll(".shg-box-content .shg-btn").forEach(function(button){const box=button.closest(".shg-box-content"),title=box?box.querySelector("h2"):null;title&&button.setAttribute("aria-label",button.textContent.trim()+" - "+title.textContent.trim())}),cartPopup.querySelectorAll(".conShop a, .js-continue-shopping").forEach(function(link){link.addEventListener("click",function(){cartButton.setAttribute("aria-expanded","false"),setTimeout(function(){lastFocusedCartButton&&lastFocusedCartButton.focus()},1e3)})})),document.querySelectorAll('.tabs a[role="tab"]').forEach(function(tab){tab.addEventListener("click",function(){const target=document.querySelector(tab.getAttribute("href"));document.querySelectorAll('.tabs a[role="tab"]').forEach(function(t){t.setAttribute("aria-selected",t===tab?"true":"false"),t.setAttribute("tabindex",t===tab?"0":"-1")}),document.querySelectorAll('.tabs-content [role="tabpanel"]').forEach(function(panel){panel.hidden=panel!==target})})}),document.querySelectorAll(".shg-sld-nav-button").forEach(function(button){button.setAttribute("role","button"),button.setAttribute("tabindex","0"),button.setAttribute("aria-label",button.classList.contains("shg-sld-left")?"Previous slide":"Next slide")}),document.querySelectorAll(".shg-image-content-wrapper img").forEach(function(img){img.setAttribute("aria-hidden","true")}),document.querySelectorAll("div.shg-box-overlay").forEach(function(element,index){!element.id&&element.children.length===0&&element.textContent.trim()===""&&(element.id="shg-box-overlay-"+(index+1))}),document.querySelectorAll(".dropdown_container").forEach(function(dropdown){dropdown.setAttribute("role","dialog"),dropdown.setAttribute("aria-modal","true")});var lastFocusedButton;document.querySelectorAll(".mobile_nav").forEach(function(button){button.addEventListener("click",function(){lastFocusedButton=this,setTimeout(function(){var dropdown=document.querySelector(".dropdown_container[data-dropdown='menu']");dropdown&&(dropdown.setAttribute("tabindex","0"),dropdown.focus())},1e3)})}),document.querySelectorAll(".close_btn").forEach(function(button){button.addEventListener("click",function(){setTimeout(function(){lastFocusedButton&&(lastFocusedButton.setAttribute("tabindex","0"),lastFocusedButton.focus())},1e3)})})});
2//# sourceMappingURL=/cdn/shop/t/187/assets/accessibility.js.map

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.