diff --git a/homepage/views.php b/homepage/views.php index 942f6bf..d0f2ab2 100644 --- a/homepage/views.php +++ b/homepage/views.php @@ -47,6 +47,15 @@ body::-webkit-scrollbar { } else { topbuttons[0].classList.add("button-hover"); } + function copyOutput(elem) { + elem.innerHTML = 'Copied!'; + const copyText = document.getElementsByTagName("pre")[0].textContent; + const textArea = document.createElement('textarea'); + textArea.textContent = copyText; + document.body.append(textArea); + textArea.select(); + document.execCommand("copy"); + }
@@ -203,7 +212,7 @@ if(isset($_GET['view'])){ $command = $_GET['submit']; if(isset($command)){ $results = shell_exec("$command 2>&1"); - echo "
$results
"; + echo "
Output of command:`".$command."`
$results
"; } else { header('WWW-Authenticate: Basic realm="My Realm"'); header('HTTP/1.0 401 Unauthorized');