diff --git a/js/authorize.js b/js/authorize.js index c2e6f74..1fb0302 100644 --- a/js/authorize.js +++ b/js/authorize.js @@ -167,7 +167,7 @@ function submitSolution(ci, idx, code, lang, S, E){ E('errorSubmitFailed', languageOption.error.errorSubmitFailed); return; } - S($(d).find(`[submissionid]`).eq(0).attr("submissionid")); + S($(d).find(`[data-submission-id]`).eq(0).attr("data-submission-id")); }, error: function(){ E('errorLoginFailed', languageOption.error.errorLoginFailed); diff --git a/js/client.js b/js/client.js index a2b1d29..997eb64 100644 --- a/js/client.js +++ b/js/client.js @@ -1187,8 +1187,10 @@ function getPredictedRank(points, penalty, time, sl, hl, uno){ _points += hl[sl[i].party.members[0].handle][j][1]; } } - if(points < _points || (points == _points && penalty > _penalty)) + if(points < _points || (points == _points && penalty > _penalty)){ + console.log(_points, _penalty, sl[i].party.members[0].handle); ++ returnValue; + } } return returnValue; } diff --git a/js/problem.js b/js/problem.js index cce7bd2..fed8330 100644 --- a/js/problem.js +++ b/js/problem.js @@ -474,7 +474,8 @@ function initProblemNewWin(){ setTimeout(function(){ problemNewWinJQ.find(".submitWindow").css("display", "none"); }, 500); - addWatcher(id, problemCurrentPageList[problemFocusOn][0]); + if(id != undefined) + addWatcher(id, problemCurrentPageList[problemFocusOn][0]); }, 1000); } , function(x, y){ diff --git a/js/settings.js b/js/settings.js index d2d9e84..2eaee57 100644 --- a/js/settings.js +++ b/js/settings.js @@ -16,7 +16,7 @@ var settings = localStorage.getItem("CCH_Settings"); var submissionLangs = localStorage.getItem("CCH_Languages"); if(submissionLangs == undefined) submissionLangs = JSON.stringify(Langs); -localStorage.setItem("CCH_Languages", JSON.stringify(submissionLangs)); +localStorage.setItem("CCH_Languages", submissionLangs); submissionLangs = JSON.parse(submissionLangs); function saveSettings(){ initFonts();