Compare commits

...

2 Commits

Author SHA1 Message Date
adb
be40fd9d75 add jitsi and etherpad shortcut 2021-02-12 17:19:28 +01:00
adb
57aeac53d9 add time and date 2021-02-12 04:04:23 +01:00
2 changed files with 68 additions and 10 deletions

View File

@ -92,6 +92,7 @@ export default {
.white{color: #fff;} .white{color: #fff;}
.green{color: #44dd88;} .green{color: #44dd88;}
.blue{color: #0081b1;} .blue{color: #0081b1;}
.red{color: #ac311c;}
input{ input{
background-color: #0000; background-color: #0000;
border: 0; border: 0;

View File

@ -82,6 +82,20 @@ let commands = [
{color: "white", content: "meet", delay: 500}, {color: "white", content: "meet", delay: 500},
] ]
}, },
{
name: "time",
output(){ return[
{color: "white", content: "your current time is: ", delay: 100},
{color: "blue", content: function(){return new Date().toLocaleTimeString()}(), delay: 200},
]}
},
{
name: "date",
output(){ return[
{color: "white", content: "your current date is: ", delay: 100},
{color: "blue", content: function(){return new Date().toLocaleDateString()}(), delay: 200},
]}
},
{ {
name: ["social", "mastodon", "Mastodon", "mstdn"], name: ["social", "mastodon", "Mastodon", "mstdn"],
output:[ output:[
@ -111,12 +125,25 @@ let commands = [
}, },
{ {
name: ["ether", "etherpad", "Etherpad"], name: ["ether", "etherpad", "Etherpad"],
output:[ output(input){
{color: "blue", content: "\nEtherpad", delay: 100}, if (input.find(arr => arr === "--help")) return [
{color: "white", content: " is loading\n", delay: 200}, {color: "white", content: "the syntax for this command is:\n", delay: 100},
{color: "white", content: "forwarding", delay: 400}, {color: "white", content: "etherpad", delay: 200},
{color: "white", content: " ...", forward: "https://ether.adb.sh", delay: 600} {color: "red", content: " [padname]", delay: 300}
] ]
return input[1]?[
{color: "blue", content: "\nEtherpad", delay: 100},
{color: "white", content: ` pad "${input[1]}" is loading\n`, delay: 200},
{color: "white", content: "forwarding", delay: 400},
{color: "white", content: " ...", forward: `https://ether.adb.sh/p/${input[1]}`, delay: 600}
]:[
{color: "blue", content: "\nEtherpad", delay: 100},
{color: "white", content: " startpage is loading\n", delay: 200},
{color: "white", content: "run with \"--help\" to show syntax\n", delay: 300},
{color: "white", content: "forwarding", delay: 400},
{color: "white", content: " ...", forward: "https://ether.adb.sh", delay: 600}
]
}
}, },
{ {
name: ["surl", "short-url", "shortURL"], name: ["surl", "short-url", "shortURL"],
@ -129,11 +156,41 @@ let commands = [
}, },
{ {
name: ["meet", "jitsi", "Jitsi"], name: ["meet", "jitsi", "Jitsi"],
output(input){
if (input.find(arr => arr === "--help")) return [
{color: "white", content: "the syntax for this command is:\n", delay: 100},
{color: "white", content: "meet", delay: 200},
{color: "red", content: " [roomname]", delay: 300}
]
return input[1]?[
{color: "blue", content: "\nJitsi", delay: 100},
{color: "white", content: ` room "${input[1]}" is loading\n`, delay: 200},
{color: "white", content: "forwarding", delay: 400},
{color: "white", content: " ...", forward: `https://meet.adb.sh/${input[1]}`, delay: 600}
]:[
{color: "blue", content: "\nJitsi", delay: 100},
{color: "white", content: " startpage is loading\n", delay: 200},
{color: "white", content: "run with \"--help\" to show syntax\n", delay: 300},
{color: "white", content: "forwarding", delay: 400},
{color: "white", content: " ...", forward: "https://meet.adb.sh", delay: 600}
]
}
},
{
name: "cat",
output:[ output:[
{color: "blue", content: "\nJitsi", delay: 100}, {
{color: "white", content: " is loading\n", delay: 200}, color: "red",
{color: "white", content: "forwarding", delay: 400}, content: "" +
{color: "white", content: " ...", forward: "https://meet.adb.sh", delay: 600} " . .\n" +
" \\`-\"'\"-'/\n" +
" } 6 6 { \n" +
" =. Y ,= \n" +
" /^^^\\ .\n" +
" / \\ )\n" +
"jgs ( )-( )/ \n" +
" \"\" \"\"",
delay: 100}
] ]
} }
] ]