PageSourceSearch

https://store.guitargate.com/cdn/shop/t/4/assets/focus.js?v=60436577539430446401767395513

js guitargate.com collected 2026-09-25 02:34:30 UTC 1,620 bytes, 2 lines download raw bytes

1const trapFocusHandlers={};function getFocusableElements(container){return Array.from(container.querySelectorAll("summary, a[href], button:enabled, [tabindex]:not([tabindex^='-']), [draggable], area, input:not([type=hidden]):enabled, select:enabled, textarea:enabled, object, iframe"))}export function trapFocus(container){removeTrapFocus();const focusable=getFocusableElements(container);if(!focusable.length)return;const first=focusable[0],last=focusable[focusable.length-1];trapFocusHandlers.keydown=event=>{if(event.key!=="Tab")return;const activeEl=document.activeElement;!event.shiftKey&&activeEl===last?(event.preventDefault(),first?.focus()):event.shiftKey&&(activeEl===first||activeEl===container)&&(event.preventDefault(),last?.focus())},trapFocusHandlers.focusin=event=>{event.target instanceof Node&&!container.contains(event.target)&&(event.stopPropagation(),first?.focus())},document.addEventListener("keydown",trapFocusHandlers.keydown,!0),document.addEventListener("focusin",trapFocusHandlers.focusin,!0),container.focus()}export function removeTrapFocus(){trapFocusHandlers.keydown&&document.removeEventListener("keydown",trapFocusHandlers.keydown,!0),trapFocusHandlers.focusin&&document.removeEventListener("focusin",trapFocusHandlers.focusin,!0)}export function cycleFocus(items,increment){let targetIndex=items.findIndex(item=>item.matches(":focus"))+increment;targetIndex>=items.length?targetIndex=0:targetIndex<0&&(targetIndex=items.length-1);const targetItem=items[targetIndex];targetItem&&targetItem.focus()}
2//# sourceMappingURL=/cdn/shop/t/4/assets/focus.js.map?v=60436577539430446401767395513

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.