diff --git a/rootfs/html/fancyindex/footer.html b/rootfs/html/fancyindex/footer.html
index 9944ab719..2cdcca9e6 100644
--- a/rootfs/html/fancyindex/footer.html
+++ b/rootfs/html/fancyindex/footer.html
@@ -8,14 +8,14 @@
document.querySelector("h1").after(input);
var items = [].slice.call(document.querySelectorAll("#list tbody tr"));
function filterItems(item, filter) {
- return !item.querySelector("td").textContent.trim().includes(filter);
+ return !item.querySelector("td").textContent.trim().toLowerCase().includes(filter);
}
input.addEventListener("keyup", function () {
items.forEach((item) => {
item.hidden = false;
});
items
- .filter((item) => filterItems(item, this.value.trim()))
+ .filter((item) => filterItems(item, this.value.trim().toLowerCase()))
.forEach((item) => {
item.hidden = true;
});
@@ -25,6 +25,16 @@
tableDiv.id = "tableDiv";
tableDiv.appendChild(document.querySelector("table"));
document.getElementById("search").after(tableDiv);
+
+ var headers = document.querySelectorAll("th");
+ headers.forEach((header) => {
+ var links = header.querySelectorAll("a");
+ var ascendingLink = document.createElement("a");
+ ascendingLink.innerHTML = " ↑ ";
+ ascendingLink.href = links[0].href;
+ links[0].removeAttribute("href");
+ links[1].after(ascendingLink);
+ });