PageSourceSearch

https://www.igigi.com/cdn/shop/t/72/assets/flits-recently-view.js?v=44459029985016681391678201802

js igigi.com collected 2026-09-26 02:07:17 UTC 5,847 bytes, 1 lines download raw bytes

1window.flitsApp&&void 0!==window.flitsApp||(window.flitsApp={}),window.flitsApp.recently_viewed_products=function(){var e="flits_recently_products",n="flits-recently-products-ul",i=[],r=this;this.setCookie=function(t,e,i){var n=new Date,i=(n.setTime(n.getTime()+24*i*60*60*1e3),"expires="+n.toUTCString());document.cookie=t+"="+e+";"+i+";path=/"},this.getCookie=function(t){for(var e=t+"=",i=decodeURIComponent(document.cookie).split(";"),n=0;n<i.length;n++){for(var r=i[n];" "==r.charAt(0);)r=r.substring(1);if(0==r.indexOf(e))return r.substring(e.length,r.length)}return""},this.get_ajax_obj=function(){return window.XMLHttpRequest?new XMLHttpRequest:window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):void 0},this.setProductData=function(){var l=flitsAppJquery("#flits-shop-money-format").val(),c=flitsAppJquery;c("[data-flits-recently-product-handle]").each(function(t,e){var a=c(this),i=c(this).attr("data-flits-recently-product-handle");c.ajax({method:"get",url:"/products/"+i+".json",success:function(t){var s=t.product,t="https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c.gif",e=(t=null!=s.image?s.image.src:t).lastIndexOf("."),e=t.substr(e),t=t.replace(e,"_200x_crop_center"+e),o=(c(a).find(".flits-product-img").css({background:"url("+t+")","background-size":"contain","background-repeat":"no-repeat","background-position":"center center","background-image":t}),0);c.each(s.variants,function(t,e){var i=window.flitsApp.formatMoney(Math.abs(100*e.price),l).replace(/((\,00)|(\.00))$/g,""),n=e.title,r=(1==s.variants.length&&"Default Title"==n&&(n=s.title),$("<option/>"));r.html(n),r.attr("value",e.id),r.attr("data-variant-price",i),c.ajax({method:"get",url:location.origin+"/products/"+s.handle+"?view=flits_product_variant_data&variant="+e.id,success:function(t){var e,t=(new DOMParser).parseFromString(t,"text/html"),t=JSON.parse(t.querySelector(".flits-product-variant-data").innerHTML);"shopify"==t.inventory_management&&"deny"==t.inventory_policy&&t.inventory_quantity<=0&&(e=(t=c(a).find(".flits-add-to-cart")).attr("data-flits-sold-out-text"),r.html(r.html()+" - "+e),-1!=c(a).find(".flits-product-variant-options option:selected").html().indexOf(e)&&t.addClass("flits-btn-danger").attr("disabled",!0).html(e))},error:function(){}}),o<=0&&(o=i),c(a).find(".flits-product-variant-options").append(r)}),c(a).find(".flits-product-variant-title").append(s.title),c(a).find(".flits-product-variant-price").append(o),c(a).attr("title",s.title)},error:function(){c(a).remove()}})})},this.update_div=function(){if("/account"==location.pathname&&(window.flitsApp.set_recently_view_add_change_event(),window.flitsApp.set_recently_view_add_click_event()),null==document.getElementById(n))return!1;var t=this.get_all_display_product();0<t.length?(flitsAppJquery(".flits-recently-view-empty").hide(),flitsAppJquery("#"+n).show(),t.forEach(function(t,e){var i=flitsAppJquery(".flits-recently-products-li-structure").clone();i.removeClass("flits-recently-products-li-structure"),i.addClass("flits-recently-product-row"),i.find(".flits-product-title-anchor").attr("href","/products/"+t),i.attr("data-flits-recently-product-handle",t),flitsAppJquery("#"+n).append(i)}),r.setProductData()):(flitsAppJquery(".flits-recently-view-empty").show(),flitsAppJquery("#"+n).hide())},this.change_position_of_elments=function(){for(var t=document.getElementById(n),e=0;e<t.children.length;e++)t.children[e].setAttribute("data-position",e);for(e=0;e<t.children.length;e++)8<e&&t.children[e].remove()},this.update_products=function(){var t=this.getCookie(e);i=""===t.trim()?[]:JSON.parse(t)},this.isFull=function(){return 8==i.length},this.is_present=function(t){for(var e=0;e<i.length;e++)if(i[e]==t)return e;return-1},this.remove_product=function(t){1==i.length?i=[]:i.splice(t,1)},this.remove_first_product=function(){var t;if(0!=i.length)return t=i[0],i.splice(0,1),t},this.save_products=function(){this.setCookie(e,JSON.stringify(i),15),this.update_div()},this.add_product=function(t){this.update_products();var e=this.is_present(t);-1!==e&&this.remove_product(e),this.isFull()&&this.remove_first_product(),i.push(t),this.save_products()},this.get_all_product=function(){return this.update_products(),i},this.get_all_display_product=function(){return this.update_products(),i.slice().reverse()},this.update_products(),this.update_div()},window.flitsApp.set_recently_view_add_change_event=function(){flitsAppJquery(document).on("change",".flits-recently-product-row .flits-product-variant-options",function(t){var e=this.options[this.selectedIndex].getAttribute("data-variant-price"),e=(this.closest(".flits-row").parentNode.querySelector(".flits-product-variant-price").innerHTML=e,""),i=this.closest(".flits-row").parentNode.querySelector(".flits-add-to-cart"),n=this.options[this.selectedIndex].innerHTML,r=i.getAttribute("data-flits-sold-out-text");-1!=n.indexOf(r)?(e=i.getAttribute("data-flits-sold-out-text"),i.disabled=!0,i.classList.add("flits-btn-danger")):(e=i.getAttribute("data-flits-add-to-cart-text"),i.disabled=!1,i.classList.remove("flits-btn-danger")),i.innerHTML=e})},window.flitsApp.set_recently_view_add_click_event=function(){flitsAppJquery(document).on("click",".flits-recently-product-row .flits-product-quantity-adjuster",function(t){var e=this.parentNode.querySelector(".flits-product-quantity-num"),i=parseInt(e.value),i=flits_validate_quantity(i);qtyMin=1,this.classList.contains("flits-product-quantity-add")?i+=1:i=i<=qtyMin?qtyMin:i-1,e.value=i}),flits_validate_quantity=function(t){return parseFloat(t)!=parseInt(t)||isNaN(t)?1:t}},window.flitsApp.recently_view_products_interval=setInterval(function(){"undefined"!=typeof flitsAppJquery&&(clearInterval(window.flitsApp.recently_view_products_interval),window.flitsApp.recently_viewed_products())},1e3);

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.