Uname: Linux webm012.cluster130.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64
Software: Apache
PHP version: 8.0.30 [ PHP INFO ] PHP os: Linux
Server Ip: 145.239.37.162
Your Ip: 216.73.216.190
User: dreampi (1009562) | Group: users (100)
Safe Mode: OFF
Disable Function:
_dyuweyrj4,_dyuweyrj4r,dl

name : header-cart.js
/**
 * Makes the header cart content scrollable if the height of the dropdown exceeds the window height.
 * Mouseover is used as items can be added to the cart via ajax and we'll need to recheck.
 */
(function () {
    if (document.body.classList.contains('woocommerce-cart') || document.body.classList.contains('woocommerce-checkout') || window.innerWidth < 768 || !document.getElementById('site-header-cart')) {
        return;
    }

    window.addEventListener('load', function () {
        var cart = document.querySelector('.site-header-cart');

        cart.addEventListener('mouseover', function () {
            var windowHeight = window.outerHeight,
                cartBottomPos = this.querySelector('.widget_shopping_cart_content').getBoundingClientRect().bottom + this.offsetHeight,
                cartList = this.querySelector('.cart_list');

            if (cartBottomPos > windowHeight) {
                cartList.style.maxHeight = '15em';
                cartList.style.overflowY = 'auto';
            }
        });
    });
})();
© 2026 GrazzMean-Shell