PageSourceSearch

https://www.bushnellgolf.com/cdn/shop/t/127/assets/bushnell-buy-now-patch.js?v=119937881875179874721790092425

js bushnellgolf.com collected 2026-09-24 09:14:06 UTC 5,063 bytes, 2 lines download raw bytes

1(function(){function relabel(scope){(scope||document).querySelectorAll(".bpdp-bin-btn").forEach(function(btn){btn.childNodes.forEach(function(node){node.nodeType===3&&/buy\s+it\s+now/i.test(node.textContent)&&(node.textContent=" Buy Now ")}),btn.dataset.binLabel&&/buy\s+it\s+now/i.test(btn.dataset.binLabel)&&(btn.dataset.binLabel="Buy Now")})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",function(){relabel()}):relabel(),document.addEventListener("shopify:section:load",function(e){relabel(e.target)})})(),(function(){function money(cents){return"$"+(cents/100).toFixed(2).replace(/\B(?=(\d{3})+(?!\d))/g,",")}function parseCents(text){var m=(text||"").replace(/,/g,"").match(/([0-9]+(?:\.[0-9]{1,2})?)/);return m?Math.round(parseFloat(m[1])*100):null}function render(){document.querySelectorAll(".bpdp-price").forEach(function(priceRow){var current=priceRow.querySelector("[data-bpdp-price-current]");if(!(!current||!priceRow.parentElement)){var cents=parseCents(current.textContent),el=priceRow.parentElement.querySelector(".bn-installments"),fourPay=cents&&cents>=5e3&&cents<=99999,monthly=cents&&cents>99999&&cents<=175e4;if(!fourPay&&!monthly){el&&el.remove();return}el||(el=document.createElement("div"),el.className="bn-installments",priceRow.insertAdjacentElement("afterend",el)),el.innerHTML=fourPay?"4 interest-free payments of <strong>"+money(Math.round(cents/4))+'</strong> with <span class="bn-installments__badge">Shop Pay</span>':"As low as <strong>$"+Math.ceil(cents/12/100).toLocaleString()+'/mo</strong> with <span class="bn-installments__badge">Shop Pay</span>'}})}function init(){render(),document.querySelectorAll(".bpdp-price [data-bpdp-price-current]").forEach(function(node){new MutationObserver(render).observe(node,{childList:!0,characterData:!0,subtree:!0})})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",init):init(),document.addEventListener("shopify:section:load",render)})(),(function(){function init(){var priceRow=document.querySelector(".bpdp-price");if(!(!priceRow||!priceRow.parentElement||document.querySelector(".bn-delivery"))){var el=document.createElement("div");el.className="bn-delivery",el.innerHTML='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" width="15" height="15"><rect x="1" y="3" width="15" height="13"/><polygon points="16 8 20 8 23 11 23 16 16 16 16 8"/><circle cx="5.5" cy="18.5" r="2.5"/><circle cx="18.5" cy="18.5" r="2.5"/></svg> Free shipping on orders over $99';var after=priceRow.parentElement.querySelector(".bn-installments")||priceRow;after.insertAdjacentElement("afterend",el)}}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",init):init()})(),(function(){var PRICE_RE=/\s*[\u2014\u2013-]\s*\$[\d,]+(?:\.\d\d)?/,css=document.createElement("style");css.textContent='[data-bpdp-atc-total]::before { content: "\\2014\\00a0"; }',document.head.appendChild(css);function addonChecked(){return!!document.querySelector(".bpdp-addon__check:checked")}function cleanBtn(btn){var total=btn.querySelector("[data-bpdp-atc-total]"),show=total&&addonChecked();btn.querySelectorAll("*").forEach(function(el){el!==total&&/^\$[\d,]+(?:\.\d\d)?$/.test((el.textContent||"").trim())&&(el.style.display="none")}),total&&(total.style.display=show?"":"none");for(var walker=document.createTreeWalker(btn,NodeFilter.SHOW_TEXT),node;node=walker.nextNode();)total&&total.contains(node)||(PRICE_RE.test(node.textContent)&&(node.textContent=node.textContent.replace(PRICE_RE," ")),node.textContent=node.textContent.replace(/\s*[\u2014\u2013]\s*$/," "))}function sweep(){document.querySelectorAll('button, a[class*="btn"], a[class*="button"]').forEach(function(btn){var t=btn.textContent||"";/add\s+to\s+cart/i.test(t)&&(/\$\s?[\d,]+/.test(t)||/[\u2014\u2013]\s*$/.test(t.trim())||btn.querySelector("[data-bpdp-atc-total]"))&&cleanBtn(btn)});var totalSpan=document.querySelector("[data-bpdp-atc-total]"),stickyPrice=document.querySelector(".bpdp-sticky__price");if(totalSpan&&stickyPrice){var v=(totalSpan.textContent||"").trim();v&&stickyPrice.textContent.trim()!==v&&(stickyPrice.textContent=v)}}
1function init(){sweep(),new MutationObserver(function(){sweep()}).observe(document.body,{childList:!0,subtree:!0}),document.addEventListener("change",function(e){e.target&&e.target.classList&&e.target.classList.contains("bpdp-addon__check")&&sweep()},!0)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",init):init()})(),(function(){function init(){document.querySelectorAll("img:not([loading])").forEach(function(img){var rect=img.getBoundingClientRect();rect.top>window.innerHeight*1.5&&img.setAttribute("loading","lazy"),img.setAttribute("decoding","async")}),document.querySelectorAll("iframe:not([loading])").forEach(function(frame){frame.setAttribute("loading","lazy")})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",init):init()})();
2//# sourceMappingURL=/cdn/shop/t/127/assets/bushnell-buy-now-patch.js.map?v=119937881875179874721790092425

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.