This commit is contained in:
Telesphoreo 2022-04-17 20:02:39 -05:00
parent 139374ba55
commit 820eb57a0a
2 changed files with 17 additions and 13 deletions

View File

@ -51,8 +51,10 @@
<div style="text-align: center;" class="col-auto m-0 p-4 row justify-content-center"> <div style="text-align: center;" class="col-auto m-0 p-4 row justify-content-center">
<h2>Enter the UUID or username of the player you want to lookup</h2> <h2>Enter the UUID or username of the player you want to lookup</h2>
<div class="input-group mb-3 w-75 p-3"> <div class="input-group mb-3 w-75 p-3">
<input id="uuid" type="text" autocomplete="off" class="form-control" placeholder="Enter player UUID or username here..."> <input id="uuid" type="text" autocomplete="off" class="form-control">
<button class="btn btn-outline-primary" type="submit" onclick="redirect();">Submit</button> <button class="btn btn-outline-primary" type="submit"
onclick="redirect();">Submit
</button>
</div> </div>
</div> </div>
<script> <script>

View File

@ -52,7 +52,8 @@
<h2>Plex HTTPD</h2> <h2>Plex HTTPD</h2>
<h5>A list of schematics is below. You can click on the schematic name to download it.</h5> <h5>A list of schematics is below. You can click on the schematic name to download it.</h5>
<div class="input-group mb-3 w-75 p-3"> <div class="input-group mb-3 w-75 p-3">
<input type="text" autocomplete="off" class="form-control" oninput="filterTable(this.value)" placeholder="Search for a schematic..."> <input type="text" autocomplete="off" class="form-control" oninput="filterTable(this.value)"
placeholder="Search for a schematic... ">
</div> </div>
<table id="schemList" class="table table-striped table-bordered"> <table id="schemList" class="table table-striped table-bordered">
<thead> <thead>
@ -67,14 +68,15 @@
</table> </table>
<script> <script>
let schemList = document.getElementById("schemList").getElementsByTagName("tbody")[0].getElementsByTagName("tr"); let schemList = document.getElementById("schemList").getElementsByTagName("tbody")[0].getElementsByTagName("tr");
function filterTable(query){
for(let i=0; i<schemList.length; i++){ function filterTable(query) {
for (let i = 0; i < schemList.length; i++) {
let th = schemList[i].getElementsByTagName("th")[0]; let th = schemList[i].getElementsByTagName("th")[0];
let schemName = th.textContent || th.innerText; let schemName = th.textContent || th.innerText;
if(schemName.toLowerCase().includes(query.toLowerCase())){ if (schemName.toLowerCase().includes(query.toLowerCase())) {
schemList[i].style.display=""; schemList[i].style.display = "";
}else{ } else {
schemList[i].style.display="none"; schemList[i].style.display = "none";
} }
} }
} }