From: Scott Worley Date: Fri, 28 Jan 2022 05:59:47 +0000 (-0800) Subject: Factor out makeTopPriority X-Git-Url: http://git.scottworley.com/vopamoi/commitdiff_plain/792b8a180ea729fd3cbfffaa915c6df9041e391d Factor out makeTopPriority --- diff --git a/vopamoi.ts b/vopamoi.ts index fe97410..ede5911 100644 --- a/vopamoi.ts +++ b/vopamoi.ts @@ -262,7 +262,7 @@ function BrowserUI() { } input.value = ""; if (event.getModifierState("Control")) { - this.setPriority(task, null, document.getElementsByClassName("task")[0]); + this.makeTopPriority(task); } }, @@ -356,6 +356,10 @@ function BrowserUI() { return valid_cursor; }, + makeTopPriority: function (task: Element) { + this.setPriority(task, null, document.getElementsByClassName("task")[0]); + }, + moveCursor: function (offset: number): boolean { const active = document.activeElement; if (!active) return false;