403Webshell
Server IP : 209.209.40.120  /  Your IP : 216.73.217.112
Web Server : Microsoft-IIS/10.0
System : Windows NT NEWWWW 10.0 build 17763 (Windows Server 2019) i586
User : NEWWWW$ ( 0)
PHP Version : 8.3.30
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/HostingSpaces/admin/aifortoday.co.uk/wwwroot/wp-content/themes/solace/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/HostingSpaces/admin/aifortoday.co.uk/wwwroot/wp-content/themes/solace/js/scripts.js
(function ($) {

    // Close Sidebar Woocommerce
    $('.nv-sidebar-wrap aside .close svg').click(function(){
        $('html').attr('class', '');
        $('.nv-sidebar-wrap aside').removeClass('sidebar-open');
    });

    if ($(".wc-block-components-text-input").hasClass("has-error")) {
        $( ".wc-block-components-totals-coupon__button" ).css("bottom", "33px !important");
    }

    $(window).on('load', function() {
        // Use setTimeout to delay the check and execution.
        setTimeout(function() {
            // Check if elements with classes `woocommerce-product-gallery__trigger` and `flex-viewport` exist
            if ($('.single-product .woocommerce-product-gallery .woocommerce-product-gallery__trigger').length || $('.single-product .woocommerce-product-gallery .flex-viewport').length) {
                // Select the element with class `woocommerce-product-gallery__trigger`
                const triggerElement = $('.single-product .woocommerce-product-gallery .woocommerce-product-gallery__trigger');
                // Move the selected element to be a child of the element with class `flex-viewport`
                $('.single-product .woocommerce-product-gallery .flex-viewport').append(triggerElement);
                $('.single-product .woocommerce-product-gallery__image').append(triggerElement);
            }

            // Check if elements with classes `onsale` and `flex-viewport` exist
            if ($('.single-product .onsale').length || $('.single-product .flex-viewport').length) {
                // Select the element with class `onsale`
                const triggerElement = $('.single-product .onsale');
                // Move the selected element to be a child of the element with class `flex-viewport`
                $('.single-product .flex-viewport').append(triggerElement);
                $('.single-product .woocommerce-product-gallery__image').append(triggerElement);
            }
        }, 200);
    });

})(jQuery);

(function ($) {
    function addElementorButtonClass() {
        $('.woocommerce .button').each(function() {
            if (!$(this).hasClass('elementor-button')) {
                $(this).addClass('elementor-button');
            }
        });
    }

    function observeDOMChanges() {
        const targetNode = document.body; 
        const config = { childList: true, subtree: true };

        const callback = function(mutationsList) {
            for (const mutation of mutationsList) {
                if (mutation.type === 'childList') {
                    addElementorButtonClass(); 
                }
            }
        };

        const observer = new MutationObserver(callback);
        observer.observe(targetNode, config);
    }

    function isElementorPreview() {
        const urlParams = new URLSearchParams(window.location.search);
        return urlParams.has('elementor-preview') || document.body.classList.contains('elementor-editor-active');
    }

    $(document).ready(function() {
        addElementorButtonClass(); 

        if (isElementorPreview()) {
            console.log("Elementor Preview Detected");

            document.body.classList.add('is-elementor-preview'); 
            observeDOMChanges();
        }
    });

    // apply color to button in live preview elementor
    jQuery(document).ready(function ($) {
        function updateButtonColor() {
            let buttonColor = $('.elementor-button').css('background-color'); 
            $('.button.add_to_cart_button').css({
                'background-color': buttonColor,
                'border-color': buttonColor
            });
        }
        
        // updateButtonColor();
    
        // setInterval(updateButtonColor, 1000);
    });
    

})(jQuery);




Youez - 2016 - github.com/yon3zu
LinuXploit