diff --git a/static/js/index.js b/static/js/index.js index 9e7c402..0960edc 100644 --- a/static/js/index.js +++ b/static/js/index.js @@ -410,7 +410,7 @@ function removeClicked(host) { // the function was made like this so that we can remove duplicated code, but // not do N*N stylizations of the box art, or make the code not flow very well function stylizeBoxArt(freshApi, appIdToStylize) { - let app_selector = $('#game-' + app.id); + let app_selector = $('#game-' + appIdToStylize); if (freshApi.currentGame === appIdToStylize) { // stylize the currently running game // destylize it, if it has the not-current-game style if (app_selector.hasClass("not-current-game")) $('#game-' + appIdToStylize).removeClass("not-current-game"); diff --git a/static/js/utils.js b/static/js/utils.js index 34dcd8d..e287f6a 100644 --- a/static/js/utils.js +++ b/static/js/utils.js @@ -191,7 +191,7 @@ NvHTTP.prototype = { $xml = this._parseXML(xmlStr); $root = $xml.find('root'); - if ($root.attr("status_code") !== 200) { + if ($root.attr("status_code") !== '200') { return false; } @@ -202,7 +202,7 @@ NvHTTP.prototype = { console.log('%c[utils.js, _parseServerInfo]', 'color:gray;', 'Parsing server info:', $root); - this.paired = $root.find("PairStatus").text().trim() === 1; + this.paired = $root.find("PairStatus").text().trim() === '1'; this.currentGame = parseInt($root.find("currentgame").text().trim(), 10); this.appVersion = $root.find("appversion").text().trim(); this.serverMajorVersion = parseInt(this.appVersion.substring(0, 1), 10); @@ -262,7 +262,7 @@ NvHTTP.prototype = { $xml = this._parseXML(ret); $root = $xml.find("root"); - if ($root.attr("status_code") !== 200) { + if ($root.attr("status_code") !== '200') { // TODO: Bubble up an error here console.error('%c[utils.js, utils.js, getAppListWithCacheFlush]', 'color: gray;', 'Applist request failed', $root.attr("status_code")); return [];