alphabetize cards, link to vanilla-js

This commit is contained in:
Alec Maier
2020-04-15 00:39:25 -04:00
parent 95d78b4e5b
commit 3d953b990b
2 changed files with 6 additions and 1 deletions

View File

@@ -53,6 +53,9 @@ window.onload = function() {
};
function renderAvailableCards() {
cards.sort(function(a, b) {
return a.role.toUpperCase().localeCompare(b.role);
});
document.getElementById("card-select").innerHTML = "";
document.getElementById("roles").innerHTML = "";
for (let i = 0; i < cards.length; i ++) {