HEX
Server: Apache
System: Linux webm003.cluster123.gra.hosting.ovh.net 6.18.39-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Tue Jul 21 12:03:15 CEST 2026 x86_64
User: vanessatli (59366)
PHP: 5.4.45
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/vanessatli/www/wp-content/plugins/themegrill-demo-importer/includes/admin/assets/js/notice.js
/**
 * Get system status datas.
 */
jQuery(
	function ( $ ) {
		let demoImporterSystemStatus = {
			// Init class.
			init: function () {
				// Generate system report.
				$( '#system-status-report', this.generateReport );

				// Select every codes added inside textarea.
				$( '#system-status-report' ).on( 'click', this.selectDetails );

				// Select every codes added inside the textarea and copy the content inside.
				$( '#copy-system-status-report' ).on( 'click', this.selectCopyDetails );
			},

			generateReport: function () {
				let report = '';

				$( '.demo-importer-status-table thead, .demo-importer-status-table tbody' ).each(
					function () {
						if ( $( this ).is( 'thead' ) ) {
							let theadLabel = $( this ).text();
							report = report + '\n== ' + $.trim( theadLabel ) + ' ==\n';
						} else {
							$( 'tr', $( this ) ).each(
								function () {
									let tbodyLabel = $( this ).find( 'td:eq(0)' ).text();
									let tbodyValue = $( this ).find( 'td:eq(1)' ).text();

									report = report + '\t' + $.trim( tbodyLabel ) + ' ' + $.trim( tbodyValue ) + '\n';
								}
							);
						}
					}
				);

				$( '#system-status-report' ).find( 'textarea' ).val( report );
			},

			selectDetails: function () {
				$( '#system-status-report' ).find( 'textarea' ).focus().select();
			},

			selectCopyDetails: function () {
				$( '#system-status-report' ).find( 'textarea' ).focus().select();
				document.execCommand( 'copy' );
			},
		};

		demoImporterSystemStatus.init();
	}
);