Skip to content

Commit 52c520f

Browse files
authored
Merge pull request #83 from CodeforcesContestHelper/dev
Tiny changes
2 parents 0d12e46 + 727544b commit 52c520f

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

js/client.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,8 @@ function flushsingleProblemlistDisplayList(sub, prob, pb) {
582582
for (var i = 0; i < sz; i++)
583583
indexToId[pb[i].index] = i;
584584
var jq = [],
585-
len = [];
585+
len = [],
586+
wa_on_1_mark = [];
586587
for (var i = 0; i < sz; i++) {
587588
var typ = "";
588589
if (prob[i].points != 0) typ = "green";
@@ -593,6 +594,7 @@ function flushsingleProblemlistDisplayList(sub, prob, pb) {
593594
$(".singleProblemlistDisplayList").append(q);
594595
jq.push(q);
595596
len.push(0);
597+
wa_on_1_mark.push(0);
596598
}
597599
var l = contestEndTime.getTime() - contestStartTime.getTime();
598600
for (var i = 0; i < sub.length; i++) {
@@ -605,9 +607,11 @@ function flushsingleProblemlistDisplayList(sub, prob, pb) {
605607
jq[indexToId[q.problem.index]].children(".singleProblemlistDisplayListItemStatus").prepend(t);
606608
else
607609
jq[indexToId[q.problem.index]].children(".singleProblemlistDisplayListItemStatus").append(t);
608-
if (!len[indexToId[q.problem.index]])
610+
if (!wa_on_1_mark[indexToId[q.problem.index]])
609611
jq[indexToId[q.problem.index]].children(".singleProblemlistDisplayListItemInfo").children(".singleProblemlistDisplayListItemInfoTimeAttempt").html(`<div subId="${q.id}" subContestId="${q.contestId}" subLink="true" class="singleProblemlistVerdictBlock ${judgeToClass(q.verdict)}">${toSmallInfo(q.verdict)}</div>`);
610612
++len[indexToId[q.problem.index]];
613+
if (q.verdict === "OK" || q.passedTestCount !== 0)
614+
++wa_on_1_mark[indexToId[q.problem.index]];
611615
if (settings.problemEventDirection == "Ascending")
612616
$(".singleProblemlistDisplayEvent").prepend(`<div class="singleProblemlistDisplayEventItem"><div class="singleProblemlistDisplayEventItemInfoDetailedTime">${getTimeLength2(qT)}</div><div class="singleProblemlistDisplayEventItemInfoIndex">${q.problem.index}</div><div class="singleProblemlistDisplayEventItemInfoVerdictBlock"><div subId="${q.id}" subLink="true" subContestId="${q.contestId}" class="singleProblemlistVerdictBlock ${judgeToClass(q.verdict)}">${toSmallInfo(q.verdict)} ${toSmallInfo(q.verdict)=="AC"?("("+q.passedTestCount+")"):("on "+(q.passedTestCount+1))}</div></div><div class="singleProblemlistDisplayEventItemInfoTestType">${toSmallTestset(q.testset)}</div></div>`)
613617
else
@@ -937,6 +941,7 @@ function flushProblemStatusBar() {
937941
$(this).append(`<span class="successColor" style="width:${g / (g + r + m) * 100}%"></span>`);
938942
$(this).append(`<span class="dangerColor" style="width:${r / (g + r + m) * 100}%"></span>`);
939943
$(this).append(`<span style="width:${m / (g + r + m) * 100}%"></span>`);
944+
$(this).attr("title", `AC ${g} / UAC ${r} / NONE ${m}`);
940945
})
941946
}
942947

js/locale.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ var lang_en = {
8989
listButton: "List",
9090
eventButton: "Event",
9191
loadingAcCount: "Loading AC Count",
92-
problemWelcome: "Add a problem / contest to start!",
92+
problemWelcome: "Add a problem / contest to start coding!",
9393
add: "Add...",
9494
addIntoProblems: "Add Problem / Contest",
9595
add_problem: "<i class='fas fa-question-circle'></i> Add Problem",
@@ -473,7 +473,7 @@ var lang_zh = {
473473
listButton: "列表",
474474
eventButton: "事件",
475475
loadingAcCount: "加载通过数中",
476-
problemWelcome: "添加题目或者比赛以开始!",
476+
problemWelcome: "添加题目或比赛题组即可开始写题!",
477477
add: "添加...",
478478
addIntoProblems: "添加题目或比赛",
479479
add_problem: "<i class='fas fa-question-circle'></i> 添加题目",

js/settings.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@ var currentDefaultSettings = {
536536
openRankPredict: 2,
537537
openStandings: 1,
538538
mainURL: "https://codeforces.com",
539-
predictorURL: "https://cf-predictor-frontend.codeforces.ml/GetNextRatingServlet",
539+
predictorURL: "https://cf-predictor.wasylf.xyz/GetNextRatingServlet",
540540
problemSubmissionDirection: "Descending",
541541
problemEventDirection: "Ascending",
542542
fontFamily: "",

0 commit comments

Comments
 (0)