HEX
Server: Apache
System: Linux cp4.skywebbox.com 5.14.0-503.15.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Nov 28 07:25:19 EST 2024 x86_64
User: alfouzantranspor (1054)
PHP: 8.3.23
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/alfouzantranspor/www/wp-content/plugins_backup/speedycache-pro/assets/js/metabox.js
jQuery(document).ready(function() {
	
	jQuery('#speedycache-generate-specific-cache').on('click', function(){
		let ccss_disabled = jQuery('#speedycache-disable-critical-css:checked');
		
		if(ccss_disabled.length){
			alert('Critical CSS is disabled for this post');
			return;
		}

		jQuery.ajax({
			'method': 'POST',
			'url': speedycache_metabox.url,
			'data': {
				'post_id': speedycache_metabox.post_id,
				'security': speedycache_metabox.nonce,
				'action': 'speedycache_generate_single_ccss',
			},
			success: function(res){
				if(!res.success){
					alert(res.data.message ? res.data.message : 'Something went wrong ! Unable to intitiate Critical CSS!');
					return;
				}
				
				alert(res.data.message);
			}
		});
	});
});