PageSourceSearch

https://wool.love/cdn/shop/t/28/assets/recently-viewed-product.js?v=104146845512212094381779727025

js wool.love collected 2026-09-27 21:17:28 UTC 5,936 bytes, 2 lines download raw bytes

1jQuery.cookie=function(b,j,m){if(typeof j!="undefined"){m=m||{},j===null&&(j="",m.expires=-1);var e="";if(m.expires&&(typeof m.expires=="number"||m.expires.toUTCString)){var f;typeof m.expires=="number"?(f=new Date,f.setTime(f.getTime()+m.expires*24*60*60*1e3)):f=m.expires,e="; expires="+f.toUTCString()}var l=m.path?"; path="+m.path:"",g=m.domain?"; domain="+m.domain:"",a=m.secure?"; secure":"";document.cookie=[b,"=",encodeURIComponent(j),e,l,g,a].join("")}else{var d=null;if(document.cookie&&document.cookie!="")for(var k=document.cookie.split(";"),h=0;h<k.length;h++){var c=jQuery.trim(k[h]);if(c.substring(0,b.length+1)==b+"="){d=decodeURIComponent(c.substring(b.length+1));break}}return d}},Shopify.Products=(function(){var config={howManyToShow:3,howManyToStoreInMemory:10,wrapperId:"recently-viewed-products",templateId:"recently-viewed-product-template",layout:"slider",swipe:!0,media:"adapt",onComplete:null},productHandleQueue=[],wrapper=null,template=null,shown=0,cookie={configuration:{expires:90,path:"/",domain:window.location.hostname},name:"shopify_recently_viewed",write:function(recentlyViewed){jQuery.cookie(this.name,recentlyViewed.join(" "),this.configuration)},read:function(){var recentlyViewed=[],cookieValue=jQuery.cookie(this.name);return cookieValue!==null&&(recentlyViewed=cookieValue.split(" ")),recentlyViewed},destroy:function(){jQuery.cookie(this.name,null,this.configuration)},remove:function(productHandle){var recentlyViewed=this.read(),position=jQuery.inArray(productHandle,recentlyViewed);position!==-1&&(recentlyViewed.splice(position,1),this.write(recentlyViewed))}},finalize=function(){var items=wrapper.find(".item");if(items.length<=2&&$("#recently-viewed-products-list").addClass("center"),$("#recently-viewed-products-list-2").addClass("recently-viewed-loaded"),wrapper.show(),config.onComplete)try{config.onComplete()}catch(error){}},moveAlong=function(){if(productHandleQueue.length&&shown<config.howManyToShow){var url=window.routes.root+"/products/"+productHandleQueue[0]+"?view=ajax_recently_viewed";jQuery.ajax({type:"get",url:url,cache:!1,success:function(product){wrapper.append(product),productHandleQueue.shift(),shown++,moveAlong()},error:function(){cookie.remove(productHandleQueue[0]),productHandleQueue.shift(),moveAlong()}})}else finalize()},doAlong=function(){if(!productHandleQueue.length||!wrapper||!wrapper.length)return;var root=window.routes&&window.routes.root?window.routes.root:"/";root=root.replace(/\/$/,"");var handles=productHandleQueue.slice(0,config.howManyToShow),index=0;wrapper.empty();function initSlider(){if(config.layout=="slider"){var blockWrapper=$(".halo-recently-viewed-block"),productGrid=blockWrapper.find(".products-carousel"),itemToShow=productGrid.data("item-to-show"),itemDots=productGrid.data("item-dots"),itemDotsMb=productGrid.data("item-dots-mb"),itemArrows=productGrid.data("item-arrows"),itemArrowsMb=productGrid.data("item-arrows-mb");productGrid.length>0&&!productGrid.hasClass("slick-initialized")&&productGrid.slick({mobileFirst:!0,adaptiveHeight:!0,vertical:!1,infinite:!0,slidesToShow:1,slidesToScroll:1,arrows:itemArrowsMb,dots:itemDotsMb,nextArrow:window.arrows.icon_next,prevArrow:window.arrows.icon_prev,rtl:window.rtl_slick,responsive:[{breakpoint:1599,settings:{arrows:itemArrows,dots:itemDots,slidesToShow:itemToShow||1,slidesToScroll:itemToShow||1}},{breakpoint:1024,settings:{arrows:itemArrows,dots:itemDots,slidesToShow:itemToShow==5?4:itemToShow,slidesToScroll:itemToShow==5?4:itemToShow}},{breakpoint:991,settings:{arrows:itemArrowsMb,dots:itemDotsMb,slidesToShow:4,slidesToScroll:4}},{breakpoint:767,settings:{arrows:itemArrowsMb,dots:itemDotsMb,slidesToShow:3,slidesToScroll:3}},{breakpoint:320,settings:{arrows:itemArrowsMb,dots:itemDotsMb,slidesToShow:2,slidesToScroll:2}}]})}}function loadNextProduct(){if(index>=handles.length){if($("#recently-viewed-products-list-2").addClass("recently-viewed-loaded"),initSlider(),config.onComplete)try{config.onComplete()}catch(error){}return}var handle=handles[index],url=root+"/products/"+handle+"?view=ajax_recently_viewed";$.ajax({type:"GET",url:url,cache:!1,success:function(data){data&&$.trim(data)!==""?wrapper.append(data):cookie.remove(handle)},error:function(){cookie.remove(handle)},complete:function(){index++,loadNextProduct()}})}loadNextProduct()};return{resizeImage:function(src,size){if(size==null)return src;if(size=="master")return src.replace(/http(s)?:/,"");var match=src.match(/\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?/i);if(match!=null){var prefix=src.split(match[0]),suffix=match[0];
1return(prefix[0]+"_"+size+suffix).replace(/http(s)?:/,"")}else return null},showRecentlyViewed:function(params){var params=params||{};jQuery.extend(config,params),productHandleQueue=cookie.read(),template=config.templateId,wrapper=jQuery("#"+config.wrapperId),config.howManyToShow=Math.min(productHandleQueue.length,config.howManyToShow),config.howManyToShow&&wrapper.length&&(template=="recently-viewed-product-popup"?moveAlong():doAlong())},getConfig:function(){return config},clearList:function(){cookie.destroy()},recordRecentlyViewed:function(params){var params=params||{};jQuery.extend(config,params);var recentlyViewed=cookie.read();if(window.location.pathname.indexOf("/products/")!==-1){var splitted=window.location.pathname.match(/\/products\/([a-z0-9\-]+)/);if(splitted==null)var productHandle=decodeURIComponent(window.location.pathname.split("/products/")[1]);else var productHandle=window.location.pathname.match(/\/products\/([a-z0-9\-]+)/)[1];var position=jQuery.inArray(productHandle,recentlyViewed);position===-1?(recentlyViewed.unshift(productHandle),recentlyViewed=recentlyViewed.splice(0,config.howManyToStoreInMemory)):(recentlyViewed.splice(position,1),recentlyViewed.unshift(productHandle)),cookie.write(recentlyViewed)}}}})();
2//# sourceMappingURL=/cdn/shop/t/28/assets/recently-viewed-product.js.map?v=104146845512212094381779727025

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.