HEX
Server: Apache
System: Linux server7 6.1.0-43-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.162-1 (2026-02-08) x86_64
User: k8148-2 (1324)
PHP: 8.1.34
Disabled: show_source, highlight_file, apache_child_terminate, apache_get_modules, apache_note, apache_setenv, virtual, dl, posix_getpwnam, posix_getpwuid, posix_mkfifo, posix_mknod, posix_setpgid, posix_setsid, posix_setuid, posix_uname, proc_nice, openlog, syslog, pfsockopen, system, shell_exec, passthru, popen, proc_open, exec
Upload Files
File: /var/www/k8148-2/htdocs/www.sport-roth.at/wp-content/plugins/malcare-security/js/connection-key.js
(function() {
	document.addEventListener('DOMContentLoaded', function() {
		var section = document.getElementById('mc-show-connection-key');
		var toggleLink = document.getElementById('mc-show-connection-key-link');
		var keyField = document.getElementById('mc-connection-key');
		var viewButton = document.getElementById('mc-view-connection-key');
		var copyButton = document.getElementById('mc-copy-connection-key');
		if (!section || !keyField || !viewButton || !copyButton) {
			return;
		}

		if (toggleLink) {
			toggleLink.addEventListener('click', function(event) {
				event.preventDefault();
				section.style.display = 'block';
				toggleLink.style.display = 'none';
			});
		}

		viewButton.addEventListener('click', function() {
			if (keyField.type === 'password') {
				keyField.type = 'text';
				viewButton.textContent = 'Hide Key';
			} else {
				keyField.type = 'password';
				viewButton.textContent = 'View Key';
			}
		});

		copyButton.addEventListener('click', function() {
			var previousType = keyField.type;
			keyField.type = 'text';

			var updateCopyState = function() {
				copyButton.textContent = 'Copied!';
				setTimeout(function() {
					copyButton.textContent = 'Copy Key';
				}, 2000);
			};

			var restoreField = function() {
				keyField.type = previousType;
			};

			if (navigator.clipboard && navigator.clipboard.writeText) {
				navigator.clipboard.writeText(keyField.value).then(function() {
					updateCopyState();
				}).finally(function() {
					restoreField();
				});
				return;
			}

			keyField.select();
			document.execCommand('copy');
			updateCopyState();
			restoreField();
		});
	});
})();