HEX
Server: Apache/2
System: Linux sv156.hostsevenplus.com 4.18.0-553.126.1.el8_10.x86_64 #1 SMP Thu May 28 06:44:09 EDT 2026 x86_64
User: npaaenew (1145)
PHP: 8.5.0
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: /home/npaaenew/domains/npaae.com/public_html/wp-content/plugins/speedycache-pro/assets/js/admin.js
jQuery(document).ready(function($) {
	$('.speedycache-test-notice .speedycache-custom-dismiss').on('click', function(e) {
		e.preventDefault();
		$('.speedycache-test-notice').slideUp();
			$.ajax({
				url: speedycache_pro_ajax.url,
				type: 'POST',
				data: {
					action: 'speedycache_dismiss_test_notice',
					security: speedycache_pro_ajax.nonce
				}
			});
		});	

	$('.speedycache-copy-test-settings').on('click', function(e){
		e.preventDefault();
		$.ajax({
			method : 'GET',
			url : speedycache_pro_ajax.url + '?action=speedycache_copy_test_settings&security='+speedycache_pro_ajax.nonce,
			success: function(res){
				if(res.success){
					alert('The settings has been successfully saved!');
					location.reload(true);
					return;
				}
				if(res.data){
					alert(res.data);
				}
			}
		});
	});

	$('#speedycache-update-cf-rules').on('click', function(e){
		e.preventDefault();
		
		let jEle = jQuery(event.target),
		has_error = false;
		
		jEle.find('span.speedycache-spinner').addClass('speedycache-spinner-active');
		$.ajax({
			method : 'GET',
			url : speedycache_pro_ajax.url + '?action=speedycache_pro_update_cf_rules&security='+speedycache_pro_ajax.nonce,
			success: function(res){
				if(res.success){
					alert('The rules has been successfully Updated!');
					return;
				}
				
				has_error = true;
				if(res.data){
					alert(res.data);
				}
			}
		})
		.always(function(){
			jEle.find('span.speedycache-spinner')?.removeClass('speedycache-spinner-active');
			
			// Need to show a tick if the save was success
			if(!has_error){
				let check = jEle.find('svg.speedycache-spinner-done');
				if(check){
					check.addClass('speedycache-spinner-done-active');
					setTimeout(() => {
						check.removeClass('speedycache-spinner-done-active');
					}, 2000);
				}
			}
		});
	});
});

function speedycache_pro_get_db_optm(){
	if(speedycache_pro_ajax.db_load){
		return;
	}

	speedycache_pro_ajax.db_load = true;
	
	jQuery.ajax({
		method : 'GET',
		url : speedycache_pro_ajax.url + '?action=speedycache_pro_get_db_optm&security='+speedycache_pro_ajax.nonce,
		beforeSend: function(){
			jQuery('.speedycache-db-number').text('(Loading...)');
		},
		success: function(res){
			if(res.success && res.data){
				for(let i in res.data){
					jQuery(`[speedycache-db-name=${i}] .speedycache-db-number`).text(`(${res.data[i]})`);
				}

				return;
			}

			if(res.data){
				alert(res.data);
			}
		}
	});
}