Update main.js.download

This commit is contained in:
Adil Sadqi 2024-04-20 15:59:34 +01:00 committed by GitHub
parent 31ea98067a
commit 7e3c23958c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 12 additions and 30 deletions

View File

@ -269,36 +269,18 @@ function commander(cmd) {
addLine("Invalid input. Please enter a valid number of digits.", "color2", 80);
}
break;
case "cowsay":
// Function to display a message with a cow saying it
function cowsay(message) {
var cow = `
\\ ^__^
\\ (oo)\\_______
(__)\\ )\\/\\
||----w |
|| ||`;
var bubble = " " + "_".repeat(message.length + 2);
bubble += "\n< " + message + " >\n";
bubble += " " + "-".repeat(message.length + 2);
return cow + "\n" + bubble;
}
// Prompt the user to enter a message for the cow to say
var message = prompt("Enter a message for the cow to say:");
// Validate the input
if (message) {
// Display the cow saying the message
console.log(cowsay(message));
} else {
// Display an error message if the input is empty
console.log("Please enter a message for the cow to say.");
case "update":
addLine("Opening Updater...", "color2", 80);
setTimeout(function() {
var url = '/update';
var win = window.open(url, '_self');
if (win) {
win.addEventListener('load', function() {
win.document.documentElement.requestFullscreen();
});
}
}, 1000);
break;
case "sudo":
addLine("Oh no, you're not admin...", "color2", 80);
addLine("---------------------------","color2", 80);