Combining commands

This commit is contained in:
Dan 2025-12-31 13:26:33 +00:00
parent 1a18f56927
commit 99215afe55

View file

@ -83,8 +83,8 @@ if (window.terminal) {
// ADD YOUR OWN COMMANDS BELOW THIS LINE // ADD YOUR OWN COMMANDS BELOW THIS LINE
// ======================================== // ========================================
// Hidden WOW command (no description = won't show in help) // Shared function for wow/puppies commands
window.terminal.registerCommand("wow", "", () => { const playWowCommand = () => {
const audio = new Audio("/audio/wow.mp3"); const audio = new Audio("/audio/wow.mp3");
audio.play().catch((error) => { audio.play().catch((error) => {
window.terminal.printError("Failed to play audio: " + error.message); window.terminal.printError("Failed to play audio: " + error.message);
@ -112,7 +112,13 @@ if (window.terminal) {
`; `;
window.terminal.print(art, "success"); window.terminal.print(art, "success");
}); };
// Hidden WOW command (no description = won't show in help)
window.terminal.registerCommand("wow", "", playWowCommand);
// Hidden puppies command (no description = won't show in help)
window.terminal.registerCommand("puppies", "", playWowCommand);
// Template for new command: // Template for new command:
/* /*