HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: /var/www/html/shootinschool/wp-content/themes/storefront/assets/js/sticky-add-to-cart.min.js
document.addEventListener("DOMContentLoaded",function(){const t=document.getElementsByClassName("storefront-sticky-add-to-cart");if(t.length&&"undefined"!=typeof storefront_sticky_add_to_cart_params){const n=document.getElementsByClassName(storefront_sticky_add_to_cart_params.trigger_class);if(0<n.length){const o=function(){n[0].getBoundingClientRect().top+n[0].scrollHeight<0?(t[0].classList.add("storefront-sticky-add-to-cart--slideInDown"),t[0].classList.remove("storefront-sticky-add-to-cart--slideOutUp")):t[0].classList.contains("storefront-sticky-add-to-cart--slideInDown")&&(t[0].classList.add("storefront-sticky-add-to-cart--slideOutUp"),t[0].classList.remove("storefront-sticky-add-to-cart--slideInDown"))};o(),window.addEventListener("scroll",function(){o()});let e=null;var s;document.body.classList.forEach(function(t){"postid-"===t.substring(0,7)&&(e=t.replace(/[^0-9]/g,""))}),!e||!(s=document.getElementById("product-"+e))||s.classList.contains("product-type-simple")||s.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()})}}});