$(document).ready(function() { $('#script_execution_log').on('click', function() { if ($(this).hasClass('')) { return; } let debug = JSON.parse($('#debug').val()), $content = $('
'), $logitems = $('
', {class: 'logitems'}), $footer = $('
', {class: 'logtotalms'}); debug.logs.forEach(function (entry) { $('
')
				.text(entry.ms + ' ' + entry.level + ' ' + entry.message)
				.appendTo($logitems);
		});
		$content.append($logitems);
		$footer.text( + " " + debug.ms + 'ms');

		overlayDialogue({
			'title': ,
			'content': $content,
			'class': 'modal-popup modal-popup-generic debug-modal position-middle',
			'footer': $footer,
			'buttons': [
				{
					'title': ,
					'cancel': true,
					'focused': true,
					'action': () => {}
				}
			]
		}, opener);
	});
});