HEX
Server: Apache
System: Linux vps.teamads.com 4.18.0-553.126.1.el8_10.x86_64 #1 SMP Thu May 28 06:44:09 EDT 2026 x86_64
User: teamadsc (1024)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: /home/teamadsc/www/wp-content/plugins/call-now-button/resources/js/settings-activated.js
function cnbConvertTimeZonePickerToAjax() {
    jQuery('#domain_timezone').on('change', () => {
        const data = {
            'action': 'cnb_domain_timezone_change',
            '_wpnonce': jQuery('#_wpnonce').val(),
            'timezone': jQuery('#domain_timezone').val(),
        };

        jQuery.post(ajaxurl, data)
            .done((response) => {
                const html = '<span class="dashicons dashicons-update"></span> Set to <code>' + response.timezone + '</code>';
                jQuery('#domain_timezone-description').html(html)
            })
            .fail(() => {
                const html = '<span class="dashicons dashicons-warning"></span> Error occured during updating';
                jQuery('#domain_timezone-description').html(html)
            })
    })
}

function cnbHideSettingsUpdatedNotice() {
    const textToFind = 'Your settings have been updated!';
    jQuery('.notice-call-now-button:contains(' + textToFind + ')').hide()
}

jQuery(() => {
    cnbConvertTimeZonePickerToAjax()
    cnbHideSettingsUpdatedNotice()
})