PageSourceSearch

https://www.bananabeauty.de/cdn/shop/t/217/assets/product-set.js?v=137288117452168943211764851660

js bananabeauty.de collected 2026-10-04 13:30:05 UTC 7,768 bytes, 2 lines download raw bytes

1function makeSelectionPossible(){const customDropdowns=document.querySelectorAll(".set-products-list-item .product-options .custom-dropdown");customDropdowns.forEach(function(customDropdown){const selectedElement=customDropdown.querySelector(".custom-dropdown-selected"),optionsElement=customDropdown.querySelector(".custom-dropdown-options"),select=customDropdown.nextElementSibling,imageWrapper=customDropdown.closest(".set-products-list-item").querySelector(".image-wrapper");selectedElement.hasAttribute("data-listener-added")||(selectedElement.addEventListener("click",function(){customDropdowns.forEach(function(dropdown){const otherOptionsElement=dropdown.querySelector(".custom-dropdown-options");dropdown!==customDropdown&&otherOptionsElement.style.display==="block"&&(otherOptionsElement.style.display="none")}),optionsElement.style.display=optionsElement.style.display==="block"?"none":"block"}),selectedElement.setAttribute("data-listener-added","true")),customDropdown.querySelectorAll(".custom-option").forEach(option=>{option.hasAttribute("data-listener-added")||(option.addEventListener("click",function(){const variantValue=this.getAttribute("data-variant");select.value=variantValue,selectedElement.innerHTML=this.innerHTML,optionsElement.style.display="none";const imageSrc=`//www.bananabeauty.de/cdn/shop/${this.getAttribute("data-featured-img")}`;imageWrapper.querySelector("img").src=imageSrc}),option.setAttribute("data-listener-added","true"))})})}function Update_cart_count(){jQuery.getJSON("/cart.js",function(cart){if(window.cart_group_set){let count=0,has_set_creator=!1;cart.items.forEach(function(element){Object.keys(element.properties).toString().toLowerCase()!="set_creator"?count+=element.quantity:has_set_creator=!0}),has_set_creator&&(count+=1),cart.item_count>0?$(".cart-count-bubble").removeClass("cart__toggle--empty"):$(".cart-count-bubble").addClass("cart__toggle--empty"),$("#cart-icon-bubble .cart-count-bubble span").html(count),$("#cart-icon-bubble .cart-count-bubble span").html(count)}else cart.item_count>0?$(".cart-count-bubble").removeClass("cart__toggle--empty"):$(".cart-count-bubble").addClass("cart__toggle--empty"),$("#cart-icon-bubble .cart-count-bubble span").html(cart.item_count),$("#cart-icon-bubble .cart-count-bubble span").html(cart.item_count)})}function updateCartDrawer(open,upsell){$("cart-drawer").addClass("active"),$("cart-drawer").removeClass("is-empty"),fetch("/cart?section_id=cart-drawer").then(function(response){return response.text()}).then(function(html){var parser=new DOMParser,doc=parser.parseFromString(html,"text/html");const cart=$(doc).find("cart-drawer")[0].innerHTML;$(document).find("cart-drawer")[0].innerHTML=cart,Update_cart_count()}).catch(function(err){console.error("Something went wrong.",err)})}let dontdoitTwice=!1;function productSet(){$(".js-option-info-btn").on("click",function(){const image=$(this).attr("data-image"),popup=$(".js-options-info-popup");$(".js-options-info-popup img").attr("src",image),popup[0].complete==!0?(popup.addClass("open"),$("body").addClass("custom-modal-open")):setTimeout(function(){popup.addClass("open"),$("body").addClass("custom-modal-open")},500)}),$(".js-options-info-popup .options-info-popup-close").on("click",function(){$(".js-options-info-popup").removeClass("open"),$("body").removeClass("custom-modal-open")}),$(".product__errors__close").on("click",function(e){e.preventDefault(),$(this).closest(".product__form__errors").removeClass("is-visible")}),$(".js-add-set").on("click",function(e){e.preventDefault();const setVariants=$(".js-set-product-options select"),setAlertforSelect=$(".product__form__errors");let addToCart=!0,cartVariants=[];var numberOfNotSelectedVariants=0;if(!dontdoitTwice)if(dontdoitTwice=!0,setVariants.each(function(){const value=$(this).find(":selected").val(),product=$(this).find(":selected").attr("data-product"),variant=$(this).find(":selected").attr("data-variant"),variantAlert=$(".custom-dropdown");var properties={};const propertiy_name=$(this).find(":selected").attr("data-property-name"),propertiy_value=$(this).find(":selected").attr("data-property-value");if(properties[propertiy_name]=propertiy_value,value!=""){if(cartVariants.length>0){var variantExsits=!1;cartVariants.map(function(value2,index){value2.id===variant&&(cartVariants[index].quantity=cartVariants[index].quantity+1,variantExsits=!0),index+1==cartVariants.length&&(variantExsits||cartVariants.push({id:variant,quantity:1,price:10,final_price:10,properties}))})}else cartVariants.push({id:variant,quantity:1,price:10,final_price:10,properties});let property=`<input type="hidden" class="js-set-properties" name="properties[${product}]" value="${variant}">`;$(this).closest("form.product__form").prepend(property),$(this).closest(".
1js-set-product-options").removeClass("error"),$(variantAlert).closest(".js-set-product-options").removeClass("error"),$(setAlertforSelect).addClass("is-visible")}else numberOfNotSelectedVariants++,$(this).addClass("error"),$(setAlertforSelect).removeClass("is-visible"),$(variantAlert).addClass("error"),addToCart=!1}),numberOfNotSelectedVariants>0&&$(setAlertforSelect).addClass("is-visible"),addToCart){document.querySelector('button.js-add-set[data-productid="8488977924420"]')&&cartVariants.push({id:42927021293722,quantity:1,price:10,final_price:10,properties:{FreeLipstick:"Set"}});let formData={items:cartVariants};$(setAlertforSelect).removeClass("is-visible"),fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(formData)}).then(response=>response.json()).then(response=>{if(response.status){errorMessage(response);return}dontdoitTwice=!1,setTimeout(function(){(document.querySelector("cart-items")||document.querySelector("cart-drawer-items")).upSellCart(),updateCartDrawer(!0)},500)}).catch(error=>{console.log(error)})}else $(".js-set-properties").remove(),$(this).closest("form.product__form").find("[data-cart-errors-container]").html(`<div class="errors">${theme.strings.set_error}<button type="button" class="product__errors__close" data-close-error>${theme.icons.closeSmall}</button></div>`),$(this).closest("form.product__form").find("[data-cart-errors-container]").addClass("is-visible")})}(function(){function initializeProductSet(){const swiperElement=document.querySelector(".setSwiper");if(swiperElement&&swiperElement.offsetParent!==null){productSet(),setTimeout(function(){makeSelectionPossible()},1e3);var swiperOneSlide=new Swiper(".setSwiper",{slidesPerView:2,spaceBetween:5,breakpoints:{576:{slidesPerView:2.3,spaceBetween:10}},navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"},pagination:{el:".swiper-pagination",clickable:!0}})}productSet(),document.querySelectorAll("modal-opener.relative")&&document.querySelectorAll("modal-opener.relative").forEach(function(value,index){value.addEventListener("click",function(click,iclick){const intervalId=setInterval(function(){const swiperElement2=document.querySelector(".setSwiper");if(swiperElement2&&swiperElement2.offsetParent!==null){clearInterval(intervalId),productSet(),setTimeout(function(){makeSelectionPossible(),typeof initializeBundleSelection=="function"&&initializeBundleSelection()},1e3);var swiperOneSlide2=new Swiper(".setSwiper",{slidesPerView:2,spaceBetween:5,breakpoints:{576:{slidesPerView:2.3,spaceBetween:10}},navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"},pagination:{el:".swiper-pagination",clickable:!0}})}else setTimeout(function(){clearInterval(intervalId)},4e3)},500)})})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",initializeProductSet):initializeProductSet()})();
2//# sourceMappingURL=/cdn/shop/t/217/assets/product-set.js.map?v=137288117452168943211764851660

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.