From 83b2084b9d4ec49976c3b545744083192e5a16d4 Mon Sep 17 00:00:00 2001 From: eraseyourknees <112027564+eraseyourknees@users.noreply.github.com> Date: Sun, 18 Sep 2022 22:26:23 +0200 Subject: [PATCH] Add quick search buttons --- css/style.css | 10 ++++++++++ index.html | 6 ++++++ js/msdl.js | 6 ++++++ 3 files changed, 22 insertions(+) diff --git a/css/style.css b/css/style.css index 5e640cc..d887da6 100644 --- a/css/style.css +++ b/css/style.css @@ -2,6 +2,16 @@ width: 100%; } +#quick-search { + text-align: center; +} +#quick-search button { + padding: 6.5px; + font-size: 9pt; + margin-right: 0; + margin-left: 0; +} + #products-list, #msdl-ms-content, #msdl-please-wait, diff --git a/index.html b/index.html index bb8955c..8d6ee88 100644 --- a/index.html +++ b/index.html @@ -33,6 +33,12 @@

Select product

+ diff --git a/js/msdl.js b/js/msdl.js index 435e586..64b3b4a 100644 --- a/js/msdl.js +++ b/js/msdl.js @@ -184,6 +184,12 @@ function updateResults() { createTable(availableProducts, search.value); } +function setSearch(query) { + var search = document.getElementById('search-products'); + search.value = query; + updateResults(); +} + function checkHash() { var hash = window.location.hash; if(hash.length == 0)