From 8a31d903420c20661be894faf8131be2e7038ada Mon Sep 17 00:00:00 2001 From: "R. Aidan Campbell" Date: Sun, 13 Mar 2016 12:56:07 -0400 Subject: [PATCH] app list is now alphabetically sorted --- static/js/index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/static/js/index.js b/static/js/index.js index 0088679..7e11cda 100644 --- a/static/js/index.js +++ b/static/js/index.js @@ -144,6 +144,9 @@ function showAppsPushed() { opt.innerHTML = appList[i].title; $('#selectGame')[0].appendChild(opt); } + $("#selectGame").html($("#selectGame option").sort(function (a, b) { // thanks, http://stackoverflow.com/a/7466196/3006365 + return a.text.toUpperCase() == b.text.toUpperCase() ? 0 : a.text.toUpperCase() < b.text.toUpperCase() ? -1 : 1 + })); if (api.currentGame != 0) $('#selectGame')[0].value = api.currentGame; gameSelectUpdated(); // default the button to 'Resume Game' if one is running. });