NexusLeads Webshell
NexusLeads


Server : LiteSpeed
System : Linux server 3.10.0-1160.90.1.el7.x86_64 #1 SMP Thu May 4 15:21:22 UTC 2023 x86_64
User : alsaif ( 1057)
PHP Version : 7.4.33
Disable Function : show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Directory :  /home/alsaif/domains/alsaif.group/private_html/media/plg_system_stats/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/alsaif/domains/alsaif.group/private_html/media/plg_system_stats/js/stats.js
/**
 * @copyright   (C) 2015 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

/**
 * stats javascript behavior
 *
 * To allow users to accept & configure stats sending
 *
 * @package     Joomla
 * @since       3.5.0
 * @version  1.0
 */

(function ($) {
	$(document).ready(function () {
		var ajaxData = {
			'option' : 'com_ajax',
			'group'  : 'system',
			'plugin' : 'renderStatsMessage',
			'format' : 'raw'
			},
			messageContainer = $('#system-message-container');

		/**
		 * Initialise events for the message container
		 *
		 * @return  void
		 */
		function initStatsEvents()
		{
			var globalContainer = messageContainer.find('.js-pstats-alert'),
				detailsContainer = messageContainer.find('.js-pstats-data-details');

			// Show details about the information being sent
			messageContainer.on('click', '.js-pstats-btn-details', function(e){
				detailsContainer.toggle(200);
				e.preventDefault();
			});

			// Always allow
			messageContainer.on('click', '.js-pstats-btn-allow-always', function(e){

				// Remove message
				globalContainer.hide(200);
				detailsContainer.remove();
				ajaxData.plugin = 'sendAlways';

				$.getJSON('index.php', ajaxData, function(response){});
				e.preventDefault();
			});

			// Allow once
			messageContainer.on('click', '.js-pstats-btn-allow-once', function(e){

				// Remove message
				globalContainer.hide(200);
				detailsContainer.remove();

				ajaxData.plugin = 'sendOnce';

				$.getJSON('index.php', ajaxData, function(response){});
				e.preventDefault();
			});

			// Never allow
			messageContainer.on('click', '.js-pstats-btn-allow-never', function(e){

				// Remove message
				globalContainer.hide(200);
				detailsContainer.remove();

				ajaxData.plugin = 'sendNever';

				$.getJSON('index.php', ajaxData, function(response){});
				e.preventDefault();
			});
		}

		ajaxData.plugin = 'sendStats';

		$.getJSON('index.php', ajaxData, function(response){
			if (response && response.html) {
				messageContainer
					.append(response.html)
					.find('.js-pstats-alert').show(200);

				initStatsEvents();
			}
		});
	});
})(jQuery);

NexusLeads