HEX
Server: nginx/1.16.1
System: Linux ecs-04358622 4.19.90-2107.6.0.0100.oe1.bclinux.x86_64 #1 SMP Wed Dec 1 19:59:44 CST 2021 x86_64
User: nginx (994)
PHP: 8.0.0
Disabled: NONE
Upload Files
File: /home/www/wp-content/plugins/wpjam-basic/static/ajax.js
jQuery(function($){
	if(window.location.protocol == 'https:'){
		ajaxurl	= ajaxurl.replace('http://', 'https://');
	}

	$.fn.extend({
		wpjam_submit: function(callback){
			let _this	= $(this);
			let data	= new FormData(_this[0]);

			data.set('_ajax_nonce',	$(this).data('nonce'));
			data.set('action',		$(this).data('action'));
			data.set('defaults',	$(this).data('data'));
			data.set('data',		$(this).serialize());

			$.ajax({
				type: 'POST',
				url: ajaxurl,
				data: data,
				processData: false,
				contentType: false,
				success: function(data){
					callback.call(_this, data);
				}
			});
		},
		wpjam_action: function(callback){
			let _this	= $(this);

			$.post(ajaxurl, {
				_ajax_nonce:	$(this).data('nonce'),
				action:			$(this).data('action'),
				data:			$(this).data('data')
			},function(data, status){
				callback.call(_this, data);
			});
		}
	});
});