mirror of
https://github.com/gravesoft/msdl.git
synced 2026-07-25 08:34:28 +00:00
Add quick search buttons
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -33,6 +33,12 @@
|
||||
<div id="products-list">
|
||||
<h2>Select product</h2>
|
||||
<input id="search-products" type="search" placeholder="Search with regex..." onInput="updateResults();">
|
||||
<div id="quick-search">
|
||||
📌
|
||||
<button onClick="setSearch('Windows 8\\.1');">Windows 8.1</button>
|
||||
<button onClick="setSearch('Windows 10');">Windows 10</button>
|
||||
<button onClick="setSearch('Windows 11');">Windows 11</button>
|
||||
</div>
|
||||
<table style="table-layout: auto;">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user