From caa93fd1819b0d57029de637029daf0bc867d17e Mon Sep 17 00:00:00 2001 From: Scott Worley Date: Tue, 25 Jan 2022 22:47:55 -0800 Subject: [PATCH] BrowserUI --- index.html | 2 +- vopamoi.ts | 18 ++++++++++-------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/index.html b/index.html index afb9231..2a82c98 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ -
+
diff --git a/vopamoi.ts b/vopamoi.ts index bc7acb7..f127da9 100644 --- a/vopamoi.ts +++ b/vopamoi.ts @@ -80,6 +80,16 @@ const UI = { }, }; +const BrowserUI = { + addTask: function (form: any) { + if (form.taskName.value) { + UI.addTask(form.taskName.value); + form.taskName.value = ""; + } + return false; + }, +}; + function focusTaskNameInput(event: any) { document.getElementById("taskName")!.focus(); event.preventDefault(); @@ -93,14 +103,6 @@ function handleKey(event: any) { } } -function browserCreateTask(form: any) { - if (form.taskName.value) { - UI.addTask(form.taskName.value); - } - form.taskName.value = ""; - return false; -} - function browserInit() { document.body.addEventListener("keydown", handleKey, { capture: false }); Log.replay(); -- 2.44.1