From: Scott Worley Date: Wed, 26 Jan 2022 06:47:55 +0000 (-0800) Subject: BrowserUI X-Git-Url: http://git.scottworley.com/vopamoi/commitdiff_plain/caa93fd1819b0d57029de637029daf0bc867d17e BrowserUI --- 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();