From 2a66021e508fe2ff6912e6e6578eaf035e1ffdd8 Mon Sep 17 00:00:00 2001 From: dweller Date: Tue, 27 Feb 2024 20:48:15 +0200 Subject: add section and arch dropdowns, wow that was a pain --- js/lmmtfy.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'js/lmmtfy.js') diff --git a/js/lmmtfy.js b/js/lmmtfy.js index a029c8f..2c5a642 100644 --- a/js/lmmtfy.js +++ b/js/lmmtfy.js @@ -8,10 +8,19 @@ const dom_query = document.getElementById("query"); const dom_sect = document.getElementById("sect"); +const dom_arch = document.getElementById("arch"); const dom_man = document.getElementById("man"); const query = dom_query.value; +const sect = dom_sect.value; +const arch = dom_arch.value; + dom_query.value = ""; +dom_sect.value = ""; +dom_arch.value = ""; + +fix_width(dom_sect); +fix_width(dom_arch); let i = 0, j = 0; let elapsed = 0; @@ -19,6 +28,15 @@ let actions = [ [250, () => { dom_query.focus(); }, 1], [150, () => { dom_query.value += query[j++]; }, query.length], + + [100, () => { dom_sect.focus(); }, 1], + [100, () => { dom_sect.value = sect; }, 1], + [100, () => { fix_width(dom_sect); }, 1], + + [100, () => { dom_arch.focus(); }, 1], + [100, () => { dom_arch.value = arch; }, 1], + [100, () => { fix_width(dom_arch); }, 1], + [250, () => { dom_man.focus(); }, 1], [250, () => { dom_man.click(); }, 1], ]; -- cgit v1.2.3