OwlCyberSecurity - MANAGER
Edit File: sticky-add-to-cart.min.js
document.addEventListener("DOMContentLoaded",function(){let n=document.getElementsByClassName("storefront-sticky-add-to-cart");if(n.length&&"undefined"!=typeof storefront_sticky_add_to_cart_params){let s=document.getElementsByClassName(storefront_sticky_add_to_cart_params.trigger_class);if(0<s.length){let t=function(){s[0].getBoundingClientRect().top+s[0].scrollHeight<0?(n[0].classList.add("storefront-sticky-add-to-cart--slideInDown"),n[0].classList.remove("storefront-sticky-add-to-cart--slideOutUp")):n[0].classList.contains("storefront-sticky-add-to-cart--slideInDown")&&(n[0].classList.add("storefront-sticky-add-to-cart--slideOutUp"),n[0].classList.remove("storefront-sticky-add-to-cart--slideInDown"))},e=(t(),window.addEventListener("scroll",function(){t()}),null);var o;document.body.classList.forEach(function(t){"postid-"===t.substring(0,7)&&(e=t.replace(/[^0-9]/g,""))}),!e||!(o=document.getElementById("product-"+e))||o.classList.contains("product-type-simple")||o.classList.contains("product-type-external")||document.getElementsByClassName("storefront-sticky-add-to-cart__content-button")[0].addEventListener("click",function(t){t.preventDefault(),document.getElementById("product-"+e).scrollIntoView()})}}});