1$(function() { 2 $("[data-toggle=menu]").on("click", function() { 3 if (!$("body").hasClass("show-menu")) { 4 $("#meco-overlay-menu").css("display", "block"); 5 setTimeout(function() { 6 $("body").addClass("show-menu"); 7 }, 50); 8 if (!$("#meco-overlay-menu #categories").length) { 9 $("#meco-overlay-menu").append($("#categories")); 10 } 11 if ($("#meco-overlay-menu #categories .navbar-categories-left").length > 1) { 12 $("#meco-overlay-menu #categories .navbar-categories-left:last").remove(); 13 } 14 } else { 15 $("body").removeClass("show-menu"); 16 setTimeout(function() { 17 $("#meco-overlay-menu").css("display", "none"); 18 }, 500); 19 if (!$("#header #categories").length) { 20 $("#header").append($("#categories")); 21 } 22 } 23 }); 24 function open_cart(e) { 25 e.preventDefault(); 26 if (!$("body").hasClass("show-cart") && $("#cart-container:visible").length < 1) { 27 window.scrollTo(0, 0); 28 $("#offcanvas-cart-overlay").css("display", "block"); 29 setTimeout(function() { 30 $("body").addClass("show-cart"); 31 }, 50); 32 } else { 33 $("body").removeClass("show-cart"); 34 $("a[data-toggle='cart']:visible").first().focus(); 35 setTimeout(function() { 36 $("#offcanvas-cart-overlay").css("display", "none"); 37 }, 500); 38 } 39 if (e.data.auto_close) { 40 setTimeout(close_cart, 3e3); 41 } 42 } 43 function close_cart() { 44 $("body").removeClass("show-cart"); 45 $("a[data-toggle='cart']:visible").first().focus(); 46 setTimeout(function() { 47 $("#offcanvas-cart-overlay").css("display", "none"); 48 }, 500); 49 } 50 $("[data-toggle=cart]").on("click", { auto_close: false }, open_cart); 51 $("#offcanvas-cart-overlay").on("click", close_cart); 52 $(document).on("keyup", function(e) { 53 e.preventDefault(); 54 e.stopPropagation(); 55 if ((e.keyCode === 9 || e.keyCode === 27) && $(e.target).closest("#offcanvas-cart-content").length === 0) { 56 if ($("body").hasClass("show-cart") && $("#cart-container:visible").length === 0) { 57 close_cart(); 58 } 59 } 60 }); 61 $("body").on("CART_DROPDOWN_OPEN", { auto_close: true }, open_cart); 62 setTimeout(function() { 63 $("body").trigger("CART_DROPDOWN_UPDATE"); 64 }, 1500); 65 if (!!navigator.userAgent.match(/Trident.*rv\:11\./)) { 66 $("body").addClass("ie11"); 67 } 68 $('[data-wrap="false"]').each(function(index, carousel) { 69 $(carousel).on("slid.bs.carousel", function() { 70 let leftCarouselArrow = $(carousel).find(".left.carousel-control"); 71 let rightCarouselArrow = $(carousel).find(".right.carousel-control"); 72 let fistCarouselSlide = $(carousel).find(".item:first-child"); 73 if (fistCarouselSlide.hasClass("active")) { 74 $(leftCarouselArrow).addClass("disabled"); 75 } else { 76 $(leftCarouselArrow).removeClass("disabled"); 77 } 78 let lastCarouselSlide = $(carousel).find(".item:last-child"); 79 if (lastCarouselSlide.hasClass("active")) { 80 $(rightCarouselArrow).addClass("disabled"); 81 } else { 82 $(rightCarouselArrow).removeClass("disabled"); 83 } 84 }); 85 }); 86}); 87$(function() { 88 $(document).on("click", ".js-garan-open", function(event) { 89 event.preventDefault(); 90 var dialog = $(this).closest(".gm-garan-buybox, .gm-garan-checkout").find(".gm-garan-dialog")[0]; 91 if (dialog && typeof dialog.showModal === "function") { 92 dialog.showModal(); 93 } 94 }); 95 $(document).on("click", ".js-garan-close", function() { 96 var dialog = $(this).closest(".gm-garan-dialog")[0]; 97 if (dialog) { 98 dialog.close(); 99 } 100 }); 101 $(document).on("click", ".gm-garan-dialog", function(event) { 102 if (event.target === this) { 103 this.close(); 104 } 105 }); 106}); 107function reveal() { 108 var reveals = document.querySelectorAll(".reveal"); 109 110 for (var i = 0; i < reveals.length; i++) { 111 var windowHeight = window.innerHeight; 112 var elementTop = reveals[i].getBoundingClientRect().top; 113 var elementVisible = 250; 114 115 if (elementTop < windowHeight - elementVisible) { 116 reveals[i].classList.add("active"); 117 } else { 118 reveals[i].classList.remove("active"); 119 } 120 } 121} 122 123window.addEventListener("scroll", reveal); 124 125function rearrangeAmazonLogin() { 126 const $amazonPayLoginInDropdown = jQuery('.navbar-nav .amazon-login-button:not(.hidden)').first(); 127 if ($amazonPayLoginInDropdown.length !== 1) { 128 return; 129 } 130 let $ssoContainer = $amazonPayLoginInDropdown.parent().find('.dropdown-sso'); 131 if ($ssoContainer.length === 1) { 132 $ssoContainer.find('.row').append('<div class="col-xs-3"><a class="sso-link sso-link-amazon" title="Amazon Pay Login" href="#"><i class="ssoicon fa fa-amazon" aria-hidden="true"></i></a></div>'); 133 const $boxSsoContainer = jQuery('.box-sso'); 134 if ($boxSsoContainer.length === 1) { 135 $boxSsoContainer.find('.sso-link-amazon').on('click', (e) => { 136 e.preventDefault(); 137 $amazonPayLoginInDropdown.click(); 138 }); 139 } 140 } else { 141 $amazonPayLoginInDropdown.after('<div class="dropdown-sso"><div class="separator"><span>Schnelle Anmeldung mit</span></div><div class="row"><div class="col-xs-3"><a class="sso-link sso-link-amazon" title="Amazon Pay Login" href="#"><i class="ssoicon fa fa-amazon" aria-hidden="true"></i></a></div></div></div>'); 142 $ssoContainer = $amazonPayLoginInDropdown.parent().find('.dropdown-sso'); 143 } 144 $amazonPayLoginInDropdown.addClass('hidden'); 145 146 $ssoContainer.find('.sso-link-amazon').on('click', (e) => { 147 e.preventDefault(); 148 $amazonPayLoginInDropdown.click(); 149 });
150} 151rearrangeAmazonLogin(); 152setInterval(rearrangeAmazonLogin, 1000);
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.