PageSourceSearch

https://www.tcpress.com/cdn/shop/t/12/assets/supadu.js?v=17367442930856542411781787256

js tcpress.com collected 2026-09-24 08:41:53 UTC 3,067 bytes, 9 lines download raw bytes

1function normalize(text){return text.trim().replace(/\s+/g," ").toLowerCase()}const productDedupeInterval=setInterval(()=>{const relatedContainer=document.querySelector(".related-products");if(!relatedContainer)return;const currentTitleEl=document.querySelector(".product__title h1, .product__title h2"),seenTitles=new Set;if(currentTitleEl){const currentTitle=normalize(currentTitleEl.textContent);seenTitles.add(currentTitle)}relatedContainer.querySelectorAll("li.slider__slide").forEach(slide=>{const titleLink=slide.querySelector(".card__heading a");if(!titleLink)return;const rawTitle=titleLink.textContent.trim(),title=normalize(rawTitle);seenTitles.has(title)?slide.style.display="none":(seenTitles.add(title),slide.style.display="")}),clearInterval(productDedupeInterval)},200),trimInterval=setInterval(()=>{const trimEl=document.querySelector("li.sf-book-details__trim");trimEl&&(trimEl.innerHTML=trimEl.innerHTML.replace(/\(\s*[whd]\s*\)/gi,'"').replace(/\s*in\s*$/i,""),clearInterval(trimInterval))},200);function setBuyButtonUnavailable(){const buyButton=document.querySelector('.product-form button.product-form__submit[name="add"]');if(!buyButton)return;const labelSpan=[...buyButton.querySelectorAll("span")].find(span=>!span.closest(".loading__spinner")&&!span.classList.contains("hidden"));labelSpan?labelSpan.textContent="Unavailable":buyButton.textContent="Unavailable"}function enforceBuyButtonUnavailable(){[0,300,700,1200,2e3].forEach(delay=>{setTimeout(()=>setBuyButtonUnavailable(),delay)})}const internationalLogicInterval=setInterval(()=>{if(!window.Shopify||window.Shopify.country==="US"){clearInterval(internationalLogicInterval);return}const container=document.querySelector(".sf-formats__buttons"),productForm=document.querySelector(".product-form");if(!container||!productForm)return;const buttons=container.querySelectorAll(".sf-formats__button"),isEpubCurrent=container.querySelector(".sf-formats__button.current")?.textContent.trim().toLowerCase()==="epub";if(buttons.forEach(btn=>{const isCurrent=btn.classList.contains("current"),isEpub=btn.textContent.trim().toLowerCase()==="epub";!isCurrent&&!isEpub&&(btn.style.pointerEvents="none",btn.style.opacity="0.4",btn.style.cursor="not-allowed")}),isEpubCurrent||enforceBuyButtonUnavailable(),!document.querySelector(".sf-international-message")){const msg=document.createElement("div");msg.className="sf-international-message",msg.style.marginTop="1rem",msg.innerHTML=`
2      <p>
3        <strong>E-pubs available worldwide.</strong> To purchase print products outside of the United States, please visit:
4        <a href="https://utpdistribution.com/" target="_blank" rel="noopener">UTP Distribution</a> in Canada or
5        <a href="https://mngbookshop.co.uk/" target="_blank" rel="noopener">Mare Nostrum</a>
6        in the UK, Europe, the Middle East, Africa, and Asia-Pacific.
7      </p>
8    `,productForm.insertAdjacentElement("afterend",msg)}clearInterval(internationalLogicInterval)},200);
9//# sourceMappingURL=/cdn/shop/t/12/assets/supadu.js.map?v=17367442930856542411781787256

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.