PageSourceSearch

https://speedcubeshop.com/cdn/shop/t/296/assets/scs-product-card.js?v=175005404107568654811785735740

js speedcubeshop.com collected 2026-10-03 19:30:06 UTC 3,583 bytes, 63 lines download raw bytes

1(()=>{function escape(str){return str==null?"":String(str).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function escapeAttr(str){return escape(str)}function stockBadge(inventory){return typeof inventory!="number"||inventory<=0?"":inventory<=20?`<span class="scs-cube-finder__stock scs-cube-finder__stock--low">
2        <span class="scs-cube-finder__stock-dot"></span>
3        Low stock \xB7 only ${inventory} left
4      </span>`:`<span class="scs-cube-finder__stock">
5      <span class="scs-cube-finder__stock-dot"></span>
6      In stock
7    </span>`}function starRating(rating,count){if(typeof rating!="number"||rating<=0||typeof count!="number"||count<3)return"";const full=Math.floor(rating),half=rating-full>=.5;let stars="";for(let i=0;i<5;i++){const cls=i<full?"is-full":i===full&&half?"is-half":"is-empty";stars+=`<span class="scs-cube-finder__star ${cls}" aria-hidden="true"></span>`}return`<span class="scs-cube-finder__rating">${stars}<span class="scs-cube-finder__rating-value">${rating.toFixed(1)}</span></span>`}function render(product,opts={}){const p=product||{},productUrl=opts.productUrl||"",price=typeof p.price=="number"?p.price.toFixed(2):"",stockBadgeHtml=stockBadge(p.inventory),ratingMarkup=starRating(p.rating,p.ratingCount),description=opts.description,descriptionHtml=opts.descriptionAlways||description?`<p class="scs-cube-finder__explanation">${escape(description)}</p>`:"";return`
8        <div class="scs-cube-finder__product-body">
9          <a
10            class="scs-cube-finder__product-image-link"
11            href="${escapeAttr(productUrl)}"
12            target="_blank"
13            rel="noopener noreferrer"
14            tabindex="-1"
15            aria-hidden="true"
16            ${opts.imgLinkAttr||""}
17          >
18            <div class="scs-cube-finder__product-image">
19              <img
20                src="${escapeAttr(p.image||"")}"
21                alt="${escapeAttr(p.title||"")}"
22                loading="lazy"
23                ${opts.imgAttr||""}
24              >
25            </div>
26          </a>
27          <div class="scs-cube-finder__product-meta">
28            <h4 class="scs-cube-finder__product-title">
29              <a
30                class="scs-cube-finder__product-title-link"
31                href="${escapeAttr(productUrl)}"
32                target="_blank"
33                rel="noopener noreferrer"
34                ${opts.titleLinkAttr||""}
35              >${escape(p.title||"")}</a>
36            </h4>
37            <div class="scs-cube-finder__product-attrs">
38              ${ratingMarkup}
39              ${stockBadgeHtml}
40            </div>
41            <p class="scs-cube-finder__price">$${price}</p>
42          </div>
43        </div>
44        ${descriptionHtml}
45        <div class="scs-cube-finder__ctas">
46          <button
47            type="button"
48            class="scs-cube-finder__cta scs-cube-finder__cta--primary"
49            ${opts.atcAttr||""}
50          >
51            <span aria-hidden="true">+</span> Add to cart
52          </button>
53          <a
54            class="scs-cube-finder__cta scs-cube-finder__cta--secondary"
55            href="${escapeAttr(productUrl)}"
56            target="_blank"
57            rel="noopener noreferrer"
58            ${opts.viewAttr||""}
59          >
60            View details <span class="scs-cube-finder__cta-arrow" aria-hidden="true">\u2197</span>
61          </a>
62        </div>`}window.ScsProductCard={render,stockBadge,starRating}})();
63//# sourceMappingURL=/cdn/shop/t/296/assets/scs-product-card.js.map?v=175005404107568654811785735740

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.