HEX
Server: LiteSpeed
System: Linux php-prod-1.spaceapp.ru 5.15.0-160-generic #170-Ubuntu SMP Wed Oct 1 10:06:56 UTC 2025 x86_64
User: xnsbb3110 (1041)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: /home/sportpoint-hotel.ru/public_html/wp-content/themes/hotelone/inc/install/js/install.js
//Remove activate button and replace with activation in progress button.
jQuery('.activate-now').live('DOMNodeInserted', function () {
    var activateButton = jQuery('.activate-now');
    if (activateButton.length) {
        var url = jQuery(activateButton).attr('href');
        if (typeof url !== 'undefined') {
            //Request plugin activation.
            jQuery.ajax({
                beforeSend: function () {
                    jQuery(activateButton).replaceWith('<a class="button updating-message">' + Hotelone_plugin_helper.activating + '...</a>');
                },
                async: true,
                type: 'GET',
                url: url,
                success: function () {
                    //Reload the page.
                    location.reload();
                }
            });
        }
    }
});
jQuery(document).ready(function ($) {
    $('body').on('click', ' .hotelone-install-plugin ', function () {
        var slug = $(this).attr('data-slug');
        wp.updates.installPlugin({
            slug: slug
        });
        return false;
    });

    $('.activate-now').on('click', function (e) {
        var activateButton = $(this);
        e.preventDefault();
        if ($(activateButton).length) {
            var url = $(activateButton).attr('href');
			
            if (typeof url !== 'undefined') {
                //Request plugin activation.
                $.ajax({
                    beforeSend: function () {
                        $(activateButton).replaceWith('<a class="button updating-message">' + Hotelone_plugin_helper.activating + '...</a>');
                    },
                    async: true,
                    type: 'GET',
                    url: url,
                    success: function () {
                        //Reload the page.
                        location.reload();
                    },
					error: function(xhr,status,error){
						console.log(error);
					}
                });
            }
        }
    });
});