Hide zero-value bestiary rows

This commit is contained in:
Your Name
2026-06-13 20:38:26 -04:00
parent 934581772d
commit b9e0cccfe1
2 changed files with 7 additions and 1 deletions
+6
View File
@@ -188,10 +188,16 @@
return value ?? "";
}
function hasAnyBestiaryValue(row) {
const keys = ["hp", "atp", "dfp", "mst", "ata", "evp", "lck", "esp", "exp", "efr", "eic", "eth", "elt", "edk"];
return keys.some((key) => Number(row[key] || 0) !== 0);
}
function visibleRows() {
const search = state.filters.search.trim().toLowerCase();
return state.rows.filter((row) => {
if (!hasAnyBestiaryValue(row)) return false;
if (state.filters.mode && row.mode !== state.filters.mode) return false;
if (state.filters.episode && row.episode !== state.filters.episode) return false;
if (state.filters.difficulty && row.difficulty !== state.filters.difficulty) return false;
+1 -1
View File
@@ -114,6 +114,6 @@
</div>
</footer>
</div>
<script src="bestiary-tables.js?v=bp-tier-none-exp-cap-1" defer></script>
<script src="bestiary-tables.js?v=hide-zero-bestiary-rows-1" defer></script>
</body>
</html>