diff --git a/picker.html b/picker.html
index b7dda38..220d387 100644
--- a/picker.html
+++ b/picker.html
@@ -56,7 +56,7 @@
| | |
- | | | |
+ | | | |
@@ -74,6 +74,11 @@
function get_ignores () {
var ignores = document.getElementById("ignored_pkmn").value;
ignored_pkmn = ignores.split("\n").filter(line => line !== "").sort();
+ set_count();
+ }
+
+ function set_count() {
+ document.getElementById("count").innerHTML = (pkmn.length-ignored_pkmn.length-picked.filter(t => t).length).toString()+" Pokes left";
}
function pickem (id) {
@@ -84,6 +89,7 @@
elem.innerHTML = available[ix];
picked[Number(id)] = available[ix]
elem.style.color = "white";
+ set_count();
}
function ignorem (id) {
@@ -102,7 +108,7 @@
var elem = document.getElementById(i.toString());
var to_ignore = elem.innerHTML;
document.getElementById(i.toString()).innerHTML = "";
- if (!ignored_pkmn.includes(to_ignore)) {
+ if (!ignored_pkmn.includes(to_ignore) & to_ignore !== "") {
ignored_pkmn[ignored_pkmn.length] = to_ignore;
}
elem.style.color = "white";
@@ -110,6 +116,7 @@
}
ignored_pkmn.sort();
document.getElementById("ignored_pkmn").value = ignored_pkmn.join("\n");
+ set_count();
}
function reset () {
@@ -119,6 +126,7 @@
elem.style.color = "white";
picked[i] = null;
}
+ set_count();
}
function copy_used() {