Bugfixes, still not fully functional

This commit is contained in:
R. Aidan Campbell 2017-10-08 09:59:37 -07:00
parent c6390338e3
commit 46e635cb6e
2 changed files with 4 additions and 4 deletions

View File

@ -410,7 +410,7 @@ function removeClicked(host) {
// the function was made like this so that we can remove duplicated code, but // 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 // not do N*N stylizations of the box art, or make the code not flow very well
function stylizeBoxArt(freshApi, appIdToStylize) { function stylizeBoxArt(freshApi, appIdToStylize) {
let app_selector = $('#game-' + app.id); let app_selector = $('#game-' + appIdToStylize);
if (freshApi.currentGame === appIdToStylize) { // stylize the currently running game if (freshApi.currentGame === appIdToStylize) { // stylize the currently running game
// destylize it, if it has the not-current-game style // destylize it, if it has the not-current-game style
if (app_selector.hasClass("not-current-game")) $('#game-' + appIdToStylize).removeClass("not-current-game"); if (app_selector.hasClass("not-current-game")) $('#game-' + appIdToStylize).removeClass("not-current-game");

View File

@ -191,7 +191,7 @@ NvHTTP.prototype = {
$xml = this._parseXML(xmlStr); $xml = this._parseXML(xmlStr);
$root = $xml.find('root'); $root = $xml.find('root');
if ($root.attr("status_code") !== 200) { if ($root.attr("status_code") !== '200') {
return false; return false;
} }
@ -202,7 +202,7 @@ NvHTTP.prototype = {
console.log('%c[utils.js, _parseServerInfo]', 'color:gray;', 'Parsing server info:', $root); 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.currentGame = parseInt($root.find("currentgame").text().trim(), 10);
this.appVersion = $root.find("appversion").text().trim(); this.appVersion = $root.find("appversion").text().trim();
this.serverMajorVersion = parseInt(this.appVersion.substring(0, 1), 10); this.serverMajorVersion = parseInt(this.appVersion.substring(0, 1), 10);
@ -262,7 +262,7 @@ NvHTTP.prototype = {
$xml = this._parseXML(ret); $xml = this._parseXML(ret);
$root = $xml.find("root"); $root = $xml.find("root");
if ($root.attr("status_code") !== 200) { if ($root.attr("status_code") !== '200') {
// TODO: Bubble up an error here // TODO: Bubble up an error here
console.error('%c[utils.js, utils.js, getAppListWithCacheFlush]', 'color: gray;', 'Applist request failed', $root.attr("status_code")); console.error('%c[utils.js, utils.js, getAppListWithCacheFlush]', 'color: gray;', 'Applist request failed', $root.attr("status_code"));
return []; return [];