PageSourceSearch

https://alternativebrewing.com.au/cdn/shop/t/230/assets/custom.js?v=64207697345111782961780258158

js alternativebrewing.com.au collected 2026-09-25 14:15:09 UTC 8,334 bytes, 2 lines download raw bytes

1(function($){function showMoreCategories(){var cats=$(".product-meta__reference.product-collections");cats.length>0&&cats.height()>52&&(cats.after('<span class="show-more">See all</span>'),cats.addClass("minimized"),$(document).on("click",".minimized + .show-more",function(e){e.preventDefault(),$(this).text("See less"),cats.addClass("maximized"),cats.removeClass("minimized")}),$(document).on("click",".maximized + .show-more",function(e){e.preventDefault(),$(this).text("See all"),cats.addClass("minimized"),cats.removeClass("maximized")}))}showMoreCategories();function categoryDescription(){$("body").hasClass("template-collection")&&setTimeout(function(){window.innerWidth<640?$("#gf_pagination_wrap").after($(".collection__description")):$(".collection__meta").after($(".collection__description"))},1)}var header={isMobile:function(){return!(window.innerWidth>640)},desktopHeader:{hide:function(){$("body").addClass("bar-hide"),$("body").removeClass("bar-show"),$(".infobox").addClass("hideThis"),$("#mini-cart").hasClass("inactive")&&$(".header.header.header--inline.header--search-expanded").addClass("hideThis")},show:function(){$("body").removeClass("bar-hide"),$("body").addClass("bar-show"),$(".infobox").removeClass("hideThis"),$(".header.header.header--inline.header--search-expanded").removeClass("hideThis")}},mobileHeader:{hide:function(){$("body").addClass("bar-hide"),$("body").removeClass("bar-show"),$("#mini-cart").hasClass("inactive")&&$(".header.header.header--inline.header--search-expanded").addClass("hideThis")},show:function(){$("body").removeClass("bar-hide"),$("body").addClass("bar-show"),$(".header.header.header--inline.header--search-expanded").removeClass("hideThis")}},hide:function(){var self=this;self.isMobile()?self.mobileHeader.hide():self.desktopHeader.hide()},show:function(){var self=this;self.isMobile()?self.mobileHeader.show():self.desktopHeader.show()}},lastScrollTop=0;window.scroll(function(){var scroll=window.scrollTop();Math.abs(lastScrollTop-scroll)>200&&(scroll>lastScrollTop&scroll>=42?header.hide():(scroll<lastScrollTop||scroll>=42)&&header.show(),lastScrollTop=scroll)});function closeCart(){$(document).on("click",".mini-cart",function(e){$(e.target).hasClass("mini-cart")&&$('[data-action="toggle-mini-cart"]')[0].click()}),$(document).on("scroll",function(){$(".mini-cart").attr("aria-hidden")=="false"&&$('[data-action="toggle-mini-cart"]')[0].click()})}function atl(){$(document).on("click",".atl_box_button",function(e){$(".atl_box_button").removeClass("active"),$(e.currentTarget).addClass("active"),$(e.currentTarget).hasClass("yes")?($('[name="attributes[Authority To Leave]"]').prop("checked",!0),setCookie("atl",!0,30)):($('[name="attributes[Authority To Leave]"]').prop("checked",!1),setCookie("atl",!1,30))})}function stampedGoToReviews(){$("body").hasClass("template-product")&&$(document).on("click",".stamped-product-reviews-badge",function(e){e.preventDefault,$('.tabs-titles [href="#reviews"]').hasClass("active")||(console.log("clicked"),$(".tab-content").removeClass("active"),$(".tabs-titles a").removeClass("active"),$('.tabs-titles a[href="#reviews"]').addClass("active"),$("#reviews").addClass("active"),StampedFn.pageReviews("1","",this),$("#reviews").trigger("click"),setTimeout($("html, body").animate({scrollTop:$("#reviews").offset().top-300},1e3),2e3))})}function handleAddToCartDisabled(){$(document).on("click",'.template-product [name="add"].button--disabled',function(e){e.preventDefault(),console.log("clicked"),$(".add-to-cart-notice").addClass("active")})}handleAddToCartDisabled(),stampedGoToReviews();function loadMoreButton(){if($("body").hasClass("template-collection")){var canonical=window.location.href;$('link[rel="canonical"]').attr("href",canonical)}$(document).on("click",".template-collection .gf-loadmore-btn",function(e){setTimeout(function(){var canonical2=window.location.href;$('link[rel="canonical"]').attr("href",canonical2)},1e3)})}loadMoreButton()})(jQuery),document.addEventListener("DOMContentLoaded",event=>{setTimeout(()=>{const stampedReviewsWidget=document.getElementById("stamped-reviews-widget");if(stampedReviewsWidget){const firstTwelveReviews=stampedReviewsWidget.querySelectorAll("#stamped-carousel-scroll-wrapper .block:nth-child(-n+12)");let maxCharacters="";window.innerWidth>=768?maxCharacters=stampedReviewsWidget.getAttribute("data-max-characters-desktop"):maxCharacters=stampedReviewsWidget.getAttribute("data-max-characters-mobile"),firstTwelveReviews&&maxCharacters!==""&&firstTwelveReviews.forEach(review=>{const reviewContent=review.querySelector(".stamped-reviews-message-block");reviewContent&&reviewContent.innerText.length>maxCharacters&&(reviewContent.innerText=reviewContent.innerText.substring(0,maxCharacters)+"...")})}},5e3)}),document.addEventListener("DOMContentLoaded",function(){var divFullDescription=document.querySelector(".full-product-description");if(divFullDescription){var fullDescription=divFullDescription.innerHTML,charLimit=1200;if(fullDescription.length>charLimit){var truncatedDescription=fullDescription.substring(0,charLimit)+"...";divFullDescription.innerHTML=truncatedDescription}}});const targetNode=document.getElementById("stamped-rewards-widget");if(targetNode){const config={childList:!0,subtree:!0},callback=function(mutationsList,observer){for(const mutation of mutationsList)if(mutation.type==="childList"){const stampedPointBalance=document.querySelector(".stamped-rewards-widget-points.stamped-point-balance");if(stampedPointBalance){stampedPointBalance.textContent=stampedPointBalance.textContent.replace(" BrewPoints","");const helpLink=document.createElement("a");helpLink.href="/pages/loyalty-and-rewards",helpLink.textContent="What is BrewPoints?",helpLink.style.display="block",helpLink.classList.add("text-accent","rewards-help-link"),stampedPointBalance.insertAdjacentElement("afterend",helpLink),observer.disconnect();break}}};new MutationObserver(callback).observe(targetNode,config)}function applyButtonWidth(){const widthElement=document.querySelector(".cart__main-content-wrapper .after-form");if(widthElement){const adjustedWidth=widthElement.offsetWidth-30;adjustedWidth>0?document.querySelectorAll("shopify-accelerated-checkout-cart > *").forEach(element=>{element.style.width=adjustedWidth+"px"}):setTimeout(applyButtonWidth,100)}else console.error("Width element not found.")}function dynamicPaymentObserver(){const targetNode2=document.getElementById("dynamic-checkout-cart");if(targetNode2){const paymentObserver=new MutationObserver(mutations=>{mutations.forEach(mutation=>{mutation.addedNodes.length&&(applyButtonWidth(),paymentObserver.disconnect())})});paymentObserver.observe(targetNode2,{childList:!0,subtree:!0})}}dynamicPaymentObserver(),(function(){var mqMobile=window.matchMedia("(max-width: 640px)"),scheduled=null;function schedulePlaceProductHelpCallLinks(){scheduled&&clearTimeout(scheduled),scheduled=setTimeout(function(){scheduled=null,placeProductHelpCallLinks()},50)}function placeProductHelpCallLinks(){document.querySelectorAll(".js-product-help-call").forEach(function(link){var container=link.closest("[data-product-help-scope]");if(container){var home=container.querySelector(".add-to-cart-group");if(home){var moreAnchor=container.querySelector("more-payment-options-link a.shopify-payment-button__more-options"),mobile=mqMobile.matches;if(mobile&&moreAnchor&&document.body.contains(moreAnchor)){if(link.nextElementSibling===moreAnchor)return;moreAnchor.insertAdjacentElement("beforebegin",link)}else{if(link.parentElement===home)return;home.appendChild(link)}}}})}function initProductHelpCallPlacement(){placeProductHelpCallLinks(),document.querySelectorAll("[data-product-help-scope]").forEach(function(container){var obs=new MutationObserver(schedulePlaceProductHelpCallLinks);obs.observe(container,{childList:!0,subtree:!0})}),window.addEventListener("resize",schedulePlaceProductHelpCallLinks),mqMobile.addEventListener?mqMobile.addEventListener("change",schedulePlaceProductHelpCallLinks):mqMobile.addListener&&mqMobile.addListener(schedulePlaceProductHelpCallLinks)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",initProductHelpCallPlacement):initProductHelpCallPlacement()})();
2//# sourceMappingURL=/cdn/shop/t/230/assets/custom.js.map?v=64207697345111782961780258158

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.