PageSourceSearch

https://omanaturalfood.com/cdn/shop/t/46/assets/a11y-enhancements.js?v=144597762069116177011787938566

js omanaturalfood.com collected 2026-10-04 13:24:38 UTC 4,787 bytes, 2 lines download raw bytes

1(function(){function videosFor(button){return(button.getAttribute("aria-controls")||"").split(/\s+/).filter(Boolean).map(function(id){return document.getElementById(id)}).filter(Boolean)}function setPlaying(button,playing){var pauseLabel=button.getAttribute("data-label-pause")||"Pause video",playLabel=button.getAttribute("data-label-play")||"Play video";button.setAttribute("aria-label",playing?pauseLabel:playLabel),button.classList.toggle("is-paused",!playing);var pauseIcon=button.querySelector(".video-pause-control__icon--pause"),playIcon=button.querySelector(".video-pause-control__icon--play");pauseIcon&&(pauseIcon.hidden=!playing),playIcon&&(playIcon.hidden=playing)}function syncButton(button){var videos=videosFor(button);setPlaying(button,videos.some(function(video){return!video.paused}))}function initVideoPauseControl(button){if(button.dataset.videoPauseReady==="true")return;var videos=videosFor(button);if(!videos.length)return;button.dataset.videoPauseReady="true";var reduceMotion=window.matchMedia("(prefers-reduced-motion: reduce)");function pauseAll(){videos.forEach(function(video){video.pause()})}function playAll(){videos.forEach(function(video){var playPromise=video.play();playPromise&&playPromise.catch&&playPromise.catch(function(){})})}reduceMotion.matches&&pauseAll(),button.addEventListener("click",function(){var playing=videos.some(function(video){return!video.paused});playing?pauseAll():playAll(),syncButton(button)}),videos.forEach(function(video){video.addEventListener("play",function(){syncButton(button)}),video.addEventListener("pause",function(){syncButton(button)})}),reduceMotion.addEventListener&&reduceMotion.addEventListener("change",function(event){event.matches&&pauseAll()}),syncButton(button)}function queryAll(root,selector){var scope=root||document,nodes=[];return scope.nodeType===1&&scope.matches&&scope.matches(selector)&&nodes.push(scope),scope.querySelectorAll(selector).forEach(function(node){nodes.push(node)}),nodes}function initVideoPauseControls(root){queryAll(root,"[data-video-pause-control]").forEach(initVideoPauseControl)}function syncInstagramLinkNames(root){queryAll(root,'a[href*="instagram.com"][aria-label]').forEach(function(link){var visible=(link.textContent||"").replace(/\s+/g," ").trim(),name=(link.getAttribute("aria-label")||"").trim();!visible||!name||name.toLowerCase().indexOf(visible.toLowerCase())===-1&&link.setAttribute("aria-label",name+" "+visible)})}function applyBadgeRole(badge){badge.getAttribute("role")||badge.setAttribute("role","img")}function nameChatBadges(root){queryAll(root,".activator__indicator[aria-label]").forEach(applyBadgeRole),queryAll(document,"shopify-chat").forEach(function(host){host.shadowRoot&&(observeRoot(host.shadowRoot),host.shadowRoot.querySelectorAll(".activator__indicator[aria-label]").forEach(applyBadgeRole))})}function siblingHeadingText(image){var parent=image.parentElement;if(!parent)return"";var heading=parent.querySelector('h1, h2, h3, h4, h5, h6, [class*="title"], [class*="heading"]');if(heading&&heading!==image)return(heading.textContent||"").replace(/\s+/g," ").trim();var sibling=parent.previousElementSibling||parent.nextElementSibling;if(sibling){var siblingHeading=sibling.querySelector("h1, h2, h3, h4, h5, h6");if(siblingHeading)return(siblingHeading.textContent||"").replace(/\s+/g," ").trim()}return""}function nameRivoStepImages(root){queryAll(root,'img[src*="Rivo_Step_"]').forEach(function(image){if(!(image.hasAttribute("alt")&&image.getAttribute("alt")!==null&&image.getAttribute("alt")!=="")){var parent=image.parentElement,parentText=parent?(parent.textContent||"").replace(/\s+/g," ").trim():"";if(parentText){image.setAttribute("alt","");return}var headingText=siblingHeadingText(image);image.setAttribute("alt",headingText)}})}function init(root){initVideoPauseControls(root),syncInstagramLinkNames(root),nameChatBadges(root),nameRivoStepImages(root)}var observerOptions={childList:!0,subtree:!0,attributes:!0,attributeFilter:["aria-label"]},observer=new MutationObserver(function(mutations){mutations.forEach(function(mutation){mutation.target&&mutation.target.nodeType===1&&init(mutation.target),mutation.addedNodes.forEac
1h(function(node){node.nodeType===1&&init(node)})})});function observeRoot(root){!root||root.__a11yObserved||(root.__a11yObserved=!0,observer.observe(root,observerOptions))}observer.observe(document.documentElement,observerOptions),document.readyState==="loading"?document.addEventListener("DOMContentLoaded",function(){init(document)}):init(document),window.addEventListener("load",function(){init(document)}),document.addEventListener("shopify:section:load",function(event){init(event.target)})})();
2//# sourceMappingURL=/cdn/shop/t/46/assets/a11y-enhancements.js.map?v=144597762069116177011787938566

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.