Skip to content

Commit

Permalink
Merge pull request #17 from CodeforcesContestHelper/dev
Browse files Browse the repository at this point in the history
Fix language load bug & submission bugs (maybe...)
  • Loading branch information
qinyihao authored Sep 13, 2021
2 parents f0d102b + d05dff5 commit ebd255c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion js/authorize.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 3 additions & 1 deletion js/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
3 changes: 2 additions & 1 deletion js/problem.js
Original file line number Diff line number Diff line change
Expand Up @@ -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){
Expand Down
2 changes: 1 addition & 1 deletion js/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit ebd255c

Please sign in to comment.