PageSourceSearch

https://enchroma.com/cdn/shop/t/60/assets/oneill-pdp.js?v=45461575485644420231780349358

js enchroma.com collected 2026-09-24 17:51:31 UTC 4,042 bytes, 2 lines download raw bytes

1(function(){"use strict";function ready(fn){document.readyState!=="loading"?fn():document.addEventListener("DOMContentLoaded",fn)}ready(function(){document.addEventListener("click",function(e){var thumb=e.target.closest(".oneill-pdp .gallery-thumbs .thumb");if(thumb){e.preventDefault();var src=thumb.getAttribute("data-src")||thumb.querySelector("img")&&thumb.querySelector("img").src;if(src){var main=document.querySelector(".oneill-pdp #mainImg");main&&(main.src=src);var siblings=thumb.parentElement.querySelectorAll(".thumb");siblings.forEach(function(t){t.classList.remove("active")}),thumb.classList.add("active")}}}),document.querySelectorAll(".oneill-pdp .lens-swatch").forEach(function(swatch){swatch.addEventListener("click",function(e){if(swatch.classList.contains("disabled")){e.preventDefault();var soldOut=document.querySelector(".oneill-pdp .sold-out-block");soldOut&&soldOut.classList.add("active");return}var url=swatch.getAttribute("data-url");if(url&&url!==""&&url!=="#"){window.location.href=url;return}document.querySelectorAll(".oneill-pdp .lens-swatch").forEach(function(s){s.classList.remove("active")}),swatch.classList.add("active");var name=swatch.getAttribute("data-name"),src=swatch.getAttribute("data-src");if(name){var sel=document.querySelector(".oneill-pdp #lensSelected");sel&&(sel.textContent=name);var badge=document.querySelector(".oneill-pdp .gallery-badge");badge&&(badge.textContent="EnChroma \xB7 "+name);var stickyName=document.querySelector(".oneill-pdp-sticky-atc .name");stickyName&&(stickyName.textContent=(window.oneillProductTitle||"")+" \xB7 "+name)}if(src){var main=document.querySelector(".oneill-pdp #mainImg");main&&(main.src=src);var stickyImg=document.querySelector(".oneill-pdp-sticky-atc .thumb img");stickyImg&&(stickyImg.src=src)}})}),document.querySelectorAll(".oneill-pdp .color-swatch").forEach(function(swatch){swatch.addEventListener("click",function(){var group=swatch.closest(".color-swatches");if(group){group.querySelectorAll(".color-swatch").forEach(function(s){s.classList.remove("active")}),swatch.classList.add("active");var name=swatch.getAttribute("data-name"),label=swatch.closest(".picker").querySelector(".selected");name&&label&&(label.textContent=name)}})}),document.querySelectorAll(".oneill-pdp .tab-btn").forEach(function(btn,i){btn.addEventListener("click",function(){var tabs=btn.closest(".tabs");if(tabs){tabs.querySelectorAll(".tab-btn").forEach(function(b){b.classList.remove("active")}),tabs.querySelectorAll(".tab-content").forEach(function(c){c.classList.remove("active")}),btn.classList.add("active");var idx=parseInt(btn.getAttribute("data-tab")||i,10),content=tabs.querySelectorAll(".tab-content")[idx];content&&content.classList.add("active")}})}),document.querySelectorAll(".oneill-pdp .faq-q").forEach(function(q){q.addEventListener("click",function(){q.parentElement.classList.toggle("open")})});var slider=document.querySelector(".oneill-pdp #compareSlider"),after=document.querySelector(".oneill-pdp #compareAfter"),divider=document.querySelector(".oneill-pdp #compareDivider");function updateCompare(){if(!(!slider||!after||!divider)){var v=slider.value;after.style.clipPath="inset(0 0 0 "+v+"%)",divider.style.left=v+"%"}}slider&&(slider.addEventListener("input",updateCompare),updateCompare());var stickyAtc=document.querySelector(".oneill-pdp-sticky-atc"),buySection=document.querySelector(".oneill-pdp .buy-section");stickyAtc&&buySection&&window.addEventListener("scroll",function(){var buyBottom=buySection.offsetTop+buySection.offsetHeight;window.scrollY>buyBottom-100&&window.scrollY<document.body.scrollHeight-window.innerHeight-600?stickyAtc.classList.add("visible"):stickyAtc.classList.remove("visible")}),document.querySelectorAll(".oneill-pdp [data-pdp-atc]").forEach(function(form){form.addEventListener("submit",function(e){var event=new CustomEvent("oneill:atc",{detail:{form:form},bubbles:!0});form.dispatchEvent(event)})})})})();
2//# sourceMappingURL=/cdn/shop/t/60/assets/oneill-pdp.js.map?v=45461575485644420231780349358

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.