PageSourceSearch

https://megagrass.com/cdn/shop/t/247/assets/recently_viewed_products.js?v=180986758443828180161694699891

js megagrass.com collected 2026-10-03 19:32:14 UTC 2,719 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 e={howManyToShow:4,howManyToStoreInMemory:10,wrapperId:"recently-viewed-products",templateId:"recently-viewed-product-template",onComplete:null},n=[],t=null,o=null,r=0,i={configuration:{expires:90,path:"/",domain:window.location.hostname},name:"shopify_recently_viewed",write:function(e2){jQuery.cookie(this.name,e2.join(" "),this.configuration)},read:function(){var e2=[],n2=jQuery.cookie(this.name);return n2!==null&&(e2=n2.split(" ")),e2},destroy:function(){jQuery.cookie(this.name,null,this.configuration)},remove:function(e2){var n2=this.read(),t2=jQuery.inArray(e2,n2);t2!==-1&&(n2.splice(t2,1),this.write(n2))}},a=function(){if(t.show(),e.onComplete)try{e.onComplete()}catch(n2){}},c=function(){n.length&&r<e.howManyToShow?jQuery.ajax({dataType:"json",url:"/products/"+n[0]+".js",cache:!1,success:function(e2){o.tmpl(e2).appendTo(t),n.shift(),r++,c()},error:function(){i.remove(n[0]),n.shift(),c()}}):a()};return{resizeImage:function(e2,n2){if(n2==null)return e2;if(n2=="master")return e2.replace(/http(s)?:/,"");var t2=e2.match(/\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?/i);if(t2==null)return null;var o2=e2.split(t2[0]),r2=t2[0];return(o2[0]+"_"+n2+r2).replace(/http(s)?:/,"")},showRecentlyViewed:function(r2){var r2=r2||{};jQuery.extend(e,r2),n=i.read(),o=jQuery("#"+e.templateId),t=jQuery("#"+e.wrapperId),e.howManyToShow=Math.min(n.length,e.howManyToShow),e.howManyToShow&&o.length&&t.length&&c()},getConfig:function(){return e},clearList:function(){i.destroy()},recordRecentlyViewed:function(n2){var n2=n2||{};jQuery.extend(e,n2);var t2=i.read();if(window.location.pathname.indexOf("/products/")!==-1){var o2=window.location.pathname.match(/\/products\/([a-z0-9\-]+)/)[1],r2=jQuery.inArray(o2,t2);r2===-1?(t2.unshift(o2),t2=t2.splice(0,e.howManyToStoreInMemory)):(t2.splice(r2,1),t2.unshift(o2)),i.write(t2)}}}})(),Shopify.Products.recordRecentlyViewed();
2//# sourceMappingURL=/cdn/shop/t/247/assets/recently_viewed_products.js.map?v=180986758443828180161694699891

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.