asdf
This commit is contained in:
@@ -5,14 +5,14 @@ enterBtn.addEventListener("click", captureInput);
|
|||||||
function captureInput() {
|
function captureInput() {
|
||||||
|
|
||||||
var dict = {
|
var dict = {
|
||||||
"gcal": createEvent,
|
"gcal": makeEvent,
|
||||||
"googlecalendar": createEvent,
|
"googlecalendar": makeEvent,
|
||||||
};
|
};
|
||||||
|
|
||||||
var input = String(document.getElementById("input").value);
|
var input = String(document.getElementById("input").value);
|
||||||
untilSpace = input.indexOf(' ');
|
untilSpace = input.indexOf(' ');
|
||||||
command = input.substring(0, untilSpace);
|
command = input.substring(0, untilSpace);
|
||||||
|
console.log(command);
|
||||||
if (command in dict) {
|
if (command in dict) {
|
||||||
dict[command](input.substring(untilSpace+1));
|
dict[command](input.substring(untilSpace+1));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user