https://www.xtremelabs.io/cdn/shop/t/8/assets/jquery.products.min.js?v=45356954439364673951790182421
1/** 2 * Cookie plugin 3 * 4 * Copyright (c) 2006 Klaus Hartl (stilbuero.de) 5 * Dual licensed under the MIT and GPL licenses: 6 * http://www.opensource.org/licenses/mit-license.php 7 * http://www.gnu.org/licenses/gpl.html 8 * 9 */ 10 11jQuery.cookie = function(b, j, m) { 12 if (typeof j != "undefined") { 13 m = m || {}; 14 if (j === null) { 15 j = ""; 16 m.expires = -1 17 } 18 var e = ""; 19 if (m.expires && (typeof m.expires == "number" || m.expires.toUTCString)) { 20 var f; 21 if (typeof m.expires == "number") { 22 f = new Date(); 23 f.setTime(f.getTime() + (m.expires * 24 * 60 * 60 * 1000)) 24 } else { 25 f = m.expires 26 } 27 e = "; expires=" + f.toUTCString() 28 } 29 var l = m.path ? "; path=" + (m.path) : ""; 30 var g = m.domain ? "; domain=" + (m.domain) : ""; 31 var a = m.secure ? "; secure" : ""; 32 document.cookie = [b, "=", encodeURIComponent(j), e, l, g, a].join("") 33 } else { 34 var d = null; 35 if (document.cookie && document.cookie != "") { 36 var k = document.cookie.split(";"); 37 for (var h = 0; h < k.length; h++) { 38 var c = jQuery.trim(k[h]); 39 if (c.substring(0, b.length + 1) == (b + "=")) { 40 d = decodeURIComponent(c.substring(b.length + 1)); 41 break 42 } 43 } 44 } 45 return d 46 } 47}; 48 49/** 50 * Module to show Recently Viewed Products 51 * 52 * Copyright (c) 2014 Caroline Schnapp (11heavens.com) 53 * Dual licensed under the MIT and GPL licenses: 54 * http://www.opensource.org/licenses/mit-license.php 55 * http://www.gnu.org/licenses/gpl.html 56 * 57 */ 58 59Shopify.Products = (function() { 60 var a = { 61 howManyToShow: 3, 62 howManyToStoreInMemory: 10, 63 wrapperId: "recently-viewed-products", 64 templateId: "recently-viewed-product-template", 65 onComplete: null 66 }; 67 var c = []; 68 var h = null; 69 var d = null; 70 var e = 0; 71 var b = { 72 configuration: { 73 expires: 90, 74 path: "/", 75 domain: window.location.hostname 76 }, 77 name: "shopify_recently_viewed", 78 write: function(i) { 79 jQuery.cookie(this.name, i.join(" "), this.configuration) 80 }, 81 read: function() { 82 var i = []; 83 var j = jQuery.cookie(this.name); 84 if (j !== null) { 85 i = j.split(" ") 86 } 87 return i 88 }, 89 destroy: function() { 90 jQuery.cookie(this.name, null, this.configuration) 91 }, 92 remove: function(k) { 93 var j = this.read(); 94 var i = jQuery.inArray(k, j); 95 if (i !== -1) { 96 j.splice(i, 1); 97 this.write(j) 98 } 99 } 100 }; 101 var f = function() { 102 h.show(); 103 if (a.onComplete) { 104 try { 105 a.onComplete() 106 } catch (i) {} 107 } 108 }; 109 var g = function() { 110 if (c.length && e < a.howManyToShow) { 111 jQuery.ajax({ 112 dataType: "json", 113 url: "/products/" + c[0] + ".js", 114 cache: false, 115 success: function(i) { 116 d.tmpl(i).appendTo(h); 117 c.shift(); 118 e++; 119 g() 120 }, 121 error: function() { 122 b.remove(c[0]); 123 c.shift(); 124 g() 125 } 126 }) 127 } else { 128 f() 129 } 130 }; 131 return { 132 resizeImage: function(m, j) { 133 if (j == null) { 134 return m 135 } 136 if (j == "master") { 137 return m.replace(/http(s)?:/, "") 138 } 139 var i = m.match(/\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?/i); 140 if (i != null) { 141 var k = m.split(i[0]); 142 var l = i[0]; 143 return (k[0] + "_" + j + l).replace(/http(s)?:/, "") 144 } else { 145 return null 146 } 147 }, 148 showRecentlyViewed: function(i) { 149 var i = i || {}; 150 jQuery.extend(a, i); 151 c = b.read(); 152 d = jQuery("#" + a.templateId); 153 h = jQuery("#" + a.wrapperId); 154 a.howManyToShow = Math.min(c.length, a.howManyToShow); 155 if (a.howManyToShow && d.length && h.length) { 156 g() 157 } 158 }, 159 getConfig: function() { 160 return a 161 }, 162 clearList: function() { 163 b.destroy() 164 }, 165 recordRecentlyViewed: function(l) { 166 var l = l || {}; 167 jQuery.extend(a, l); 168 var j = b.read(); 169 if (window.location.pathname.indexOf("/products/") !== -1) { 170 var k = window.location.pathname.match(/\/products\/([a-z0-9\-]+)/)[1]; 171 var i = jQuery.inArray(k, j); 172 if (i === -1) { 173 j.unshift(k); 174 j = j.splice(0, a.howManyToStoreInMemory) 175 } else { 176 j.splice(i, 1); 177 j.unshift(k) 178 } 179 b.write(j) 180 } 181 } 182 } 183})();
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.