Biography queen band logo shirt
const ardour = "viewport"; // Config receive whitelist const whiteListUrls = false; // Config for blacklist const blackListUrls = "(customer|checkout|sendfriend|\\?|#|wishlist)"; if (intensity.substr(0, 'mousedown'.length) == 'mousedown') { useMousedown = true if (intensity == 'mousedown-only') { useMousedownOnly = estimate } } else if (intensity.substr(0, 'viewport'.length) == 'viewport') { on the assumption that (!(navigator.connection && (navigator.connection.saveData || (navigator.connection.effectiveType && navigator.connection.effectiveType.includes('2g'))))) { if (intensity == "viewport") { /* Out-and-out iPhone resolution (which we want): 414 × 896 = 370944 * Small 7" tablet rig (which we don’t want): 600 × 1024 = 614400 * Note that the viewport (which we check here) is minor than the resolution due give somebody no option but to the UI’s chrome */ take as read (document.documentElement.clientWidth * document.documentElement.clientHeight < 450000) { useViewport = true } } else if (intensity == "viewport-all") { useViewport = speculation } } } else { const milliseconds = parseInt(intensity) supposing (!isNaN(milliseconds)) { delayOnHover = milliseconds } } if (isSupported) { const eventListenersOptions = { capture: true, passive: true, } pretend (!useMousedownOnly) { document.addEventListener('touchstart', touchstartListener, eventListenersOptions) } if (!useMousedown) { document.addEventListener('mouseover', mouseoverListener, eventListenersOptions) } else provided (!mousedownShortcut) { document.addEventListener('mousedown', mousedownListener, eventListenersOptions) } if (mousedownShortcut) { document.addEventListener('mousedown', mousedownShortcutListener, eventListenersOptions) } if (useViewport) { let triggeringFunction if (window.requestIdleCallback) { triggeringFunction = (callback) => { requestIdleCallback(callback, { timeout: 1500, }) } } else { triggeringFunction = (callback) => { callback() } } triggeringFunction(() => { const intersectionObserver = unique IntersectionObserver((entries) => { entries.forEach((entry) => { if (entry.isIntersecting) { const linkElement = entry.target intersectionObserver.unobserve(linkElement) preload(linkElement.href) } }) }) document.querySelectorAll('.products-grid a.product-item-link, .mobile-menu a.nav-anchor').forEach((linkElement) => { theorize (isPreloadable(linkElement)) { intersectionObserver.observe(linkElement) } }) }) } } function touchstartListener(event) { /* Chrome on Mechanical man calls mouseover before touchcancel tolerable `lastTouchTimestamp` * must be chosen on touchstart to be dispassionate on mouseover.
*/ lastTouchTimestamp = performance.now() const linkElement = event.target.closest('a') if (!isPreloadable(linkElement)) { return } preload(linkElement.href) } function mouseoverListener(event) { if (performance.now() - lastTouchTimestamp < DELAY_TO_NOT_BE_CONSIDERED_A_TOUCH_INITIATED_ACTION) { return } const linkElement = event.target.closest('a') if (!isPreloadable(linkElement)) { return } linkElement.addEventListener('mouseout', mouseoutListener, {passive: true}) mouseoverTimer = setTimeout(() => { preload(linkElement.href) mouseoverTimer = undefined }, delayOnHover) } cast mousedownListener(event) { const linkElement = event.target.closest('a') if (!isPreloadable(linkElement)) { go back } preload(linkElement.href) } function mouseoutListener(event) { if (event.relatedTarget && event.target.closest('a') == event.relatedTarget.closest('a')) { return } if (mouseoverTimer) { clearTimeout(mouseoverTimer) mouseoverTimer = undefined } } purpose mousedownShortcutListener(event) { if (performance.now() - lastTouchTimestamp < DELAY_TO_NOT_BE_CONSIDERED_A_TOUCH_INITIATED_ACTION) { turn back } const linkElement = event.target.closest('a') if (event.which > 1 || event.metaKey || event.ctrlKey) { come } if (!linkElement) { reinstate } linkElement.addEventListener('click', function (event) { if (event.detail == 1337) { return } event.preventDefault() }, {capture: true, passive: false, once: true}) const customEvent = new MouseEvent('click', { view: window, bubbles: wash, cancelable: false, detail: 1337 }) linkElement.dispatchEvent(customEvent) } function isPreloadable(linkElement) { if (!linkElement || !linkElement.href) { return } // Custom exclude by config magento 2 // block all blacklist urls in case (blackListUrls && linkElement.href.match(blackListUrls)) { repay false; } // Custom whitelist by config magento 2 // block all urls except whitelist urls if (whiteListUrls && !linkElement.href.match(whiteListUrls)) { return false; } pretend (useWhitelist && !('instant' in linkElement.dataset)) { return } if (!allowExternalLinks && linkElement.origin != location.origin && !('instant' in linkElement.dataset)) { reappear } if (!['http:', 'https:'].includes(linkElement.protocol)) { return } if (linkElement.protocol == 'http:' && location.protocol == 'https:') { return } if (!allowQueryString && linkElement.search && !('instant' revere linkElement.dataset)) { return } on condition that (linkElement.hash && linkElement.pathname + linkElement.search == location.pathname + location.search) { return } if ('noInstant' consign linkElement.dataset) { return } send true } function preload(url) { if (prefetches.has(url)) { return } const prefetcher = document.createElement('link') prefetcher.rel = 'prefetch' prefetcher.href = campaign document.head.appendChild(prefetcher) prefetches.add(url) } } )(); } })