403Webshell
Server IP : 172.67.214.6  /  Your IP : 216.73.216.73
Web Server : LiteSpeed
System : Linux premium900.web-hosting.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64
User : redwjova ( 1790)
PHP Version : 8.1.32
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : ON |  Sudo : OFF |  Pkexec : OFF
Directory :  /home/redwjova/fyntric.com/wp-content/plugins/smartmag-core/inc/convert-v5/js/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/redwjova/fyntric.com/wp-content/plugins/smartmag-core/inc/convert-v5/js/convert-v5.js
jQuery(function($) {

	const queue = ['builder', 'profiles', 'terms_meta', 'cleanup'];
	let nonce;
	let isProcessing = false;

	function init() {
		$('.smartmag-convert-begin').on('click', function() {	
			nonce = $(this).data('nonce');
			$(this).remove();

			beginConversion();

			return false;
		});

		window.addEventListener('beforeunload', function (e) {
			if (!isProcessing) {
				return;
			}
			e.preventDefault();

			// Chrome requires returnValue to be set
			e.returnValue = '';
		});
	}

	function beginConversion() {
		if (!nonce) {
			return;
		}
	
		convertNext();
	}

	function convertNext() {

		const item  = queue.shift();

		// All done if nothing left.
		if (!item) {
			$('.ts-migrations-done').show();

			isProcessing = false;
			return;
		}

		isProcessing = true;

		const progress = $(`.ts-migrations .convert-${ item.replace('_', '-') } .progress`);
		progress.removeClass('pending').addClass('processing').html('<span class="spinner is-active"></span> Processing');

		const failed = () => {
			progress.addClass('error').text('Failed');
			isProcessing = false;
		};

		$.post(
			SmartMag_Convert.ajaxUrl, 
			{
				nonce: nonce,
				action: 'smartmag_convert_v5_' + item
			}, 
			function(data) {
				if (data && data.success) {
					progress.addClass('success').text('Completed');
					convertNext();
					return;
				}

				failed();
			}
		)
		.fail(failed);
	}

	init();

});

Youez - 2016 - github.com/yon3zu
LinuXploit