diff --git a/items/index.html b/items/index.html
index 236d698..50cd1dd 100644
--- a/items/index.html
+++ b/items/index.html
@@ -47,7 +47,7 @@
+
diff --git a/js/sq2items.js b/js/sq2items.js
index 5699044..76d6695 100644
--- a/js/sq2items.js
+++ b/js/sq2items.js
@@ -1,4 +1,54 @@
+document.addEventListener("DOMContentLoaded", function() {
+ let filterInputs = new Map([["category", ["ALL", "armor", "helmet", "chestplate", "leggings", "boots", "accessory", "ring", "bracelet", "weapon", "wand", "spear", "bow", "dagger", "relik"]],
+ ["rarity", ["ANY", "Normal", "Unique", "Set", "Rare", "Legendary", "Fabled", "Mythic", "Sane"]],
+ ["filter1", sq2ItemFilters],
+ ["filter2", sq2ItemFilters],
+ ["filter3", sq2ItemFilters],
+ ["filter4", sq2ItemFilters]]);
+ for (const [field, data] of filterInputs) {
+ filterInputs.set(field, new autoComplete({
+ data: {
+ src: data,
+ },
+ threshold: 0,
+ selector: "#"+ field +"-choice",
+ wrapper: false,
+ resultsList: {
+ maxResults: 100,
+ tabSelect: true,
+ noResults: true,
+ class: "search-box dark-7 rounded-bottom px-2 fw-bold dark-shadow-sm",
+ element: (list, data) => {
+ let position = document.getElementById(field+'-choice').getBoundingClientRect();
+ list.style.top = position.bottom + window.scrollY +"px";
+ list.style.left = position.x+"px";
+ list.style.width = position.width+"px";
+ list.style.maxHeight = position.height * 4 +"px";
+ if (!data.results.length) {
+ message = document.createElement('li');
+ message.classList.add('scaled-font');
+ message.textContent = "No results found!";
+ list.prepend(message);
+ };
+ },
+ },
+ resultItem: {
+ class: "scaled-font search-item",
+ selected: "dark-5",
+ },
+ events: {
+ input: {
+ selection: (event) => {
+ if (event.detail.selection.value) {
+ event.target.value = event.detail.selection.value;
+ };
+ },
+ },
+ }
+ }));
+ };
+});
const sq2_translate_mappings = {
//"Name": "name",