PageSourceSearch

https://logicofenglish.com/cdn/shop/t/23/assets/quick-add.js?v=141404306700085839971737404529

js logicofenglish.com collected 2026-10-02 12:32:23 UTC 5,195 bytes, 10 lines download raw bytes

1customElements.get("quick-add-modal")||customElements.define("quick-add-modal",class extends ModalDialog{constructor(){super(),this.modalContent=this.querySelector('[id^="QuickAddInfo-"]'),this.productCard=this.closest(".product-card"),this.productUrl=this.productCard.querySelector('a[id^="CardLink"]')?.href,this.productTitle=this.productCard.querySelector('a[id^="CardLink"]')?.textContent,this.preloadData=null,this.isPreloading=!1}fetchProductData(){return fetch(this.productUrl).then(response=>response.text()).then(responseText=>{const responseHTML=new DOMParser().parseFromString(responseText,"text/html");return this.productElement=responseHTML.querySelector('div[id^="MainProduct-"]'),this.productElement.classList.forEach(classApplied=>{(classApplied.startsWith("color-")||classApplied==="gradient")&&this.modalContent.classList.add(classApplied)}),this.preventDuplicatedIDs(),this.removeDOMElements(),this.productElement.innerHTML})}hide(preventFocus=!1){const cartNotification=document.querySelector("cart-notification")||document.querySelector("cart-drawer");cartNotification&&cartNotification.setActiveElement(this.openedBy),this.modalContent.innerHTML="",preventFocus&&(this.openedBy=null),publish(PUB_SUB_EVENTS.quickViewClose),super.hide()}show(opener){opener.setAttribute("aria-disabled",!0),opener.classList.add("loading"),opener.querySelector(".loading__spinner").classList.remove("hidden");const finalizeShow=productHTML=>{this.setInnerHTML(this.modalContent,productHTML),window.Shopify&&Shopify.PaymentButton&&Shopify.PaymentButton.init(),window.ProductModel&&window.ProductModel.loadShopifyXR(),this.removeGalleryListSemantic(),this.updateImageSizes(),this.preventVariantURLSwitching(),this.prependProductTitle(),window.renderSelects(),window.loadDesktopOnlyTemplates(),super.show(opener),opener.removeAttribute("aria-disabled"),opener.classList.remove("loading"),opener.querySelector(".loading__spinner").classList.add("hidden"),publish(PUB_SUB_EVENTS.quickViewOpen),publish("quick-buy-action-complete"),setTimeout(()=>{window.ProductModel&&window.ProductModel.loadShopifyXR()},500)};this.preloadData?finalizeShow(this.preloadData):(this.productUrl=opener.getAttribute("data-product-url"),this.fetchProductData().then(finalizeShow))}setInnerHTML(element,html){element.innerHTML=html,element.querySelectorAll("script").forEach(oldScriptTag=>{const newScriptTag=document.createElement("script");Array.from(oldScriptTag.attributes).forEach(attribute=>{newScriptTag.setAttribute(attribute.name,attribute.value)}),newScriptTag.appendChild(document.createTextNode(oldScriptTag.innerHTML)),oldScriptTag.parentNode.replaceChild(newScriptTag,oldScriptTag)})}preventVariantURLSwitching(){const variantPicker=this.modalContent.querySelector("variant-selects");variantPicker&&variantPicker.setAttribute("data-update-url","false")}removeDOMElements(){const pickupAvailability=this.productElement.querySelector("pickup-availability");pickupAvailability&&pickupAvailability.remove();const productModal=this.productElement.querySelector("product-modal");productModal&&productModal.remove();const modalDialog=this.productElement.querySelectorAll("modal-dialog");modalDialog&&modalDialog.forEach(modal=>modal.remove())}preventDuplicatedIDs(){const sectionId=this.productElement.dataset.section;this.productElement.innerHTML=this.productElement.innerHTML.replaceAll(sectionId,`quickadd-${sectionId}`),this.productElement.querySelectorAll("variant-selects, product-info").forEach(element=>{element.dataset.originalSection=sectionId})}removeGalleryListSemantic(){const galleryList=this.modalContent.querySelector('[id^="Slider-Gallery"]');galleryList&&(galleryList.setAttribute("role","presentation"),galleryList.querySelectorAll('[id^="Slide-"]').forEach(li=>li.setAttribute("role","presentation")))}updateImageSizes(){const product=this.modalContent.querySelector(".product");if(!product.classList.contains("product--columns"))return;const mediaImages=product.querySelectorAll(".product__media img");if(!mediaImages.length)return;let mediaImageSizes="(min-width: 1000px) 715px, (min-width: 750px) calc((100vw - 11.5rem) / 2), calc(100vw - 4rem)";product.classList.contains("product--medium")?mediaImageSizes=mediaImageSizes.replace("715px","605px"):product.classList.contains("product--small")&&(mediaImageSizes=mediaImageSizes.replace("715px","495px")),mediaImages.forEac
1h(img=>img.setAttribute("sizes",mediaImageSizes))}prependProductTitle(){const product=this.modalContent.querySelector(".product");if(!product.querySelector(".product__title")){const container=product.querySelector("product-info .product__info-container"),productTitleHTML=`
2              <div class="product__title">
3                <a href="${this.productUrl}" class="link un-underlined-link">
4                  <h2 class="h2 mt-0">
5                    ${this.productTitle}
6                    <span class="product__read-more block underlined-link t4">${window.strings.product.readMore}</span>
7                  </h2>
8                </a>
9              </div>`;container.innerHTML=productTitleHTML+container.innerHTML}}});
10//# sourceMappingURL=/cdn/shop/t/23/assets/quick-add.js.map?v=141404306700085839971737404529

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.