From d0516f4464ae491ef6896e9104771525ac26e79b Mon Sep 17 00:00:00 2001 From: ehpersonal38 <103586016+ehpersonal38@users.noreply.github.com> Date: Sat, 14 May 2022 13:20:59 -0400 Subject: [PATCH] Much prettier "Update" screen --- homepage/views.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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');