hotkey / to focus search
Ted Unangst tedu@tedunangst.com
Sat, 26 Aug 2023 14:56:28 -0400
2 files changed,
6 insertions(+),
1 deletions(-)
M
views/header.html
→
views/header.html
@@ -52,7 +52,7 @@ </details>
<li><a href="/help/honk.1.html">help</a> <li> <form action="/q" method="GET"> -<input type="text" name="q" autocomplete=off size=10 placeholder="search"> +<input type="text" name="q" autocomplete=off size=10 id="searchbox" placeholder="search"> </form> </ul> </details>
M
views/honkpage.js
→
views/honkpage.js
@@ -457,6 +457,11 @@ break;
case "KeyK": scrollprevioushonk(); break; + case "Slash": + document.getElementById("topmenu").open = true + document.getElementById("searchbox").focus() + e.preventDefault() + break } })