Combining commands
This commit is contained in:
parent
1a18f56927
commit
99215afe55
1 changed files with 11 additions and 5 deletions
|
|
@ -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:
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue