Update main.js.download
This commit is contained in:
parent
31ea98067a
commit
7e3c23958c
|
@ -269,36 +269,18 @@ function commander(cmd) {
|
||||||
addLine("Invalid input. Please enter a valid number of digits.", "color2", 80);
|
addLine("Invalid input. Please enter a valid number of digits.", "color2", 80);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "cowsay":
|
case "update":
|
||||||
// Function to display a message with a cow saying it
|
addLine("Opening Updater...", "color2", 80);
|
||||||
function cowsay(message) {
|
setTimeout(function() {
|
||||||
var cow = `
|
var url = '/update';
|
||||||
\\ ^__^
|
var win = window.open(url, '_self');
|
||||||
\\ (oo)\\_______
|
if (win) {
|
||||||
(__)\\ )\\/\\
|
win.addEventListener('load', function() {
|
||||||
||----w |
|
win.document.documentElement.requestFullscreen();
|
||||||
|| ||`;
|
});
|
||||||
|
}
|
||||||
var bubble = " " + "_".repeat(message.length + 2);
|
}, 1000);
|
||||||
bubble += "\n< " + message + " >\n";
|
break;
|
||||||
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.");
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "sudo":
|
case "sudo":
|
||||||
addLine("Oh no, you're not admin...", "color2", 80);
|
addLine("Oh no, you're not admin...", "color2", 80);
|
||||||
addLine("---------------------------","color2", 80);
|
addLine("---------------------------","color2", 80);
|
||||||
|
|
Loading…
Reference in New Issue