From 76b953f80195caa1c3a7f3b3216f002ad8df08b6 Mon Sep 17 00:00:00 2001 From: Skylar Ittner Date: Fri, 9 Sep 2016 13:28:07 -0600 Subject: [PATCH] Fix a couple things after code review --- www/js/location.js | 12 ++++++------ www/js/main.js | 5 +++-- www/js/user.js | 2 +- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/www/js/location.js b/www/js/location.js index 2a35801..4162eb1 100644 --- a/www/js/location.js +++ b/www/js/location.js @@ -26,12 +26,12 @@ */ // Globals -lockGot = false; -terrainGot = false; -latitude = 0.0000; -longitude = 0.0000; -gpsaccuracy = 9999; -requiredaccuracy = 40; +var lockGot = false; +var terrainGot = false; +var latitude = 0.0000; +var longitude = 0.0000; +var gpsaccuracy = 9999; +var requiredaccuracy = 40; // End Globals var fetchplacecounter = 0; diff --git a/www/js/main.js b/www/js/main.js index d4cb2c4..edeaa55 100644 --- a/www/js/main.js +++ b/www/js/main.js @@ -147,10 +147,11 @@ function scanCode() { function sortResults(array, prop, asc) { array = array.sort(function (a, b) { - if (asc) + if (asc) { return (a[prop] > b[prop]) ? 1 : ((a[prop] < b[prop]) ? -1 : 0); - else + } else { return (b[prop] > a[prop]) ? 1 : ((b[prop] < a[prop]) ? -1 : 0); + } }); return array; } diff --git a/www/js/user.js b/www/js/user.js index 29d7de8..cee0c98 100644 --- a/www/js/user.js +++ b/www/js/user.js @@ -60,7 +60,7 @@ function getChat() { data.forEach(function (msg) { var usernameclass = "chat-username"; if (msg.username === 'skylarmt') { - usernameclass = "chat-username-admin" + usernameclass = "chat-username-admin"; } content += "" + msg.username + " " + msg.message + "
"; });