]> git.scottworley.com Git - vopamoi/commitdiff
Factor out makeTopPriority
authorScott Worley <scottworley@scottworley.com>
Fri, 28 Jan 2022 05:59:47 +0000 (21:59 -0800)
committerScott Worley <scottworley@scottworley.com>
Fri, 28 Jan 2022 05:59:47 +0000 (21:59 -0800)
vopamoi.ts

index fe97410107bbec955ca53324aca8176f912d6e31..ede591112fa498b3285974dfe475584515c7ef71 100644 (file)
@@ -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;