diff --git a/css/client.css b/css/client.css index c0b9930..c3caba5 100644 --- a/css/client.css +++ b/css/client.css @@ -21,7 +21,7 @@ body{ } .HtmlContainer{ width: 1000px; - height: 668px; + height: 658px; overflow: hidden; margin: 0px; user-select:none; @@ -70,19 +70,19 @@ body{ .ToolList{ -webkit-app-region: drag; position: relative; - height: 38px; + height: 30px; } .ToolListTitle{ margin: 8px 12px; - font-size: 16px; + font-size: 14px; } .ToolListButton{ -webkit-app-region: no-drag; cursor: pointer; transition: 0.2s; - width: 55px; - height: 38px; - font-size: 16px; + width: 45px; + height: 30px; + font-size: 14px; display: grid; place-items: center; } @@ -116,7 +116,7 @@ body{ height: 80px; } .contentRowInfo{ - height: 680px; + height: 630px; display: flex; flex-direction: row; position: absolute; @@ -738,7 +738,7 @@ img[src=""],img:not([src]){opacity:0;} display: flex; flex-direction: row; padding: 3px 10px; - font-size: 16px; + font-size: 14px; width: calc(100% - 20px); text-align: center; } @@ -1281,8 +1281,14 @@ pre{ - - +/* PROFILE */ +.infoUserSelector{ + width: calc(100% - 10px); + padding: 5px; + position: absolute; + top: 0px; + transition: 0.2s; +} diff --git a/css/dark.css b/css/dark.css index 4cb8717..a805cda 100644 --- a/css/dark.css +++ b/css/dark.css @@ -13,9 +13,6 @@ body{ .ToolListMinimize:hover{ background: #666; } -.ToolList{ - border-bottom: 2px solid #555; -} .NavBarCurr{ background: #555; } diff --git a/css/default.css b/css/default.css index 0ee40c0..035189b 100644 --- a/css/default.css +++ b/css/default.css @@ -13,9 +13,6 @@ body{ .ToolListMinimize:hover{ background: #bbb; } -.ToolList{ - border-bottom: 2px solid #ccc; -} .NavBarCurr{ background: #999; } diff --git a/css/problem/client.css b/css/problem/client.css index d118e1c..34cf4b6 100644 --- a/css/problem/client.css +++ b/css/problem/client.css @@ -34,6 +34,7 @@ body{ flex-direction: column; font-family: var(--font-family); position: relative; + overflow: hidden; } .HtmlContainer > div:last-child{ flex: 1; @@ -53,12 +54,12 @@ body{ } .sideBar > div{ overflow-x: hidden; - overflow-y: scroll; - width: 160px; + overflow-y: auto; + width: 175px; height: 100%; } .sideBar:hover{ - width: 160px; + width: 175px; } .sideBarGroupContents{ border-radius: 10px; @@ -69,7 +70,7 @@ body{ font-size: 16px; padding: 10px; padding-left: 10px; - width: 135px; + width: calc(100% - 20px); font-family: var(--font-family); border-left: 0px solid rgb(255, 204, 102); user-select: none; @@ -109,20 +110,20 @@ body{ .ToolList{ -webkit-app-region: drag; position: relative; - height: 36px; + height: 30px; } .ToolListTitle{ margin: 8px 12px; - font-size: 16px; + font-size: 14px; user-select: none; } .ToolListButton{ -webkit-app-region: no-drag; cursor: pointer; transition: 0.2s; - width: 55px; - height: 38px; - font-size: 16px; + width: 45px; + height: 30px; + font-size: 14px; display: grid; place-items: center; } diff --git a/css/problem/dark.css b/css/problem/dark.css index d4b0d4d..a5b9bfb 100644 --- a/css/problem/dark.css +++ b/css/problem/dark.css @@ -18,9 +18,6 @@ body{ .sideBarItem:hover, .addProblemSidebar:hover{ background: #888; } -.ToolList{ - border-bottom: 2px solid #555; -} .ToolListMinimize:hover, .ToolListMaximize:hover{ background: #666; } diff --git a/css/problem/default.css b/css/problem/default.css index 0ed3cac..c3834ea 100644 --- a/css/problem/default.css +++ b/css/problem/default.css @@ -18,9 +18,6 @@ body{ .sideBarItem:hover, .addProblemSidebar:hover{ background: #eee; } -.ToolList{ - border-bottom: 2px solid #ccc; -} .ToolListMinimize:hover, .ToolListMaximize:hover{ background: #bbb; } diff --git a/index.html b/index.html index 500731e..a46036d 100644 --- a/index.html +++ b/index.html @@ -18,7 +18,8 @@ delimiters: [ {left: "$$", right: "$$", display: true}, {left: "$", right: "$", display: false} - ] + ], + colorIsTextColor: true, }; Codeforces Contest Helper @@ -542,7 +543,7 @@
-
+
@@ -806,6 +807,17 @@
+
+
+
Radio Name
+
Radio Addition
+
+
+
+
+
+
+
Radio Name
@@ -950,6 +962,7 @@ + `) + problemNewWinJQ.append(``) }, 1000); } , function(x, y){ @@ -664,8 +695,8 @@ function openProblemWin(xx, gid){ nw.Window.open("problem.html",{ "title": "Codeforces Problems", "icon": "favicon.png", - "width": 600, - "height": 420, + "width": 800, + "height": 570, "position": "center", "resizable": true, "min_width": 450, @@ -703,7 +734,7 @@ function openProblemWin(xx, gid){ }); } function addContest(ci){ - loadContestProblemset(ci, function(data, info){ + loadContestProblemset(ci, false, function(data, info){ addProblems(data, ci, info); }, function(){}); } @@ -717,8 +748,8 @@ function openContestProblems(xx){ nw.Window.open("problem.html",{ "title": "Codeforces Problems", "icon": "favicon.png", - "width": 600, - "height": 420, + "width": 800, + "height": 570, "position": "center", "resizable": true, "min_width": 450, diff --git a/js/profile.js b/js/profile.js new file mode 100644 index 0000000..e69de29 diff --git a/js/settings.js b/js/settings.js index 10f3335..c7371eb 100644 --- a/js/settings.js +++ b/js/settings.js @@ -421,6 +421,30 @@ var settingsFunctions = { saveSettings(); return settings.showProblemStatus; } + }, + headBackOption: { + initial: function(){ + var q = $("[info=singleHeadBack]"); + q.attr("info", "singleHeadBack" + (settings.headBackOption)); + q.html(languageOption.general["singleHeadBack" + (settings.headBackOption)]); + return [localize("singleHeadBackOptions" + (settings.headBackOption)), true, true]; + }, + previous: function(){ + var q = $(`[info=singleHeadBack${settings.headBackOption}]`); + settings.headBackOption = 1 - settings.headBackOption; + q.attr("info", "singleHeadBack" + (settings.headBackOption)); + q.html(languageOption.general["singleHeadBack" + (settings.headBackOption)]); + reinitSingleButton(); saveSettings(); + return [localize("singleHeadBackOptions" + (settings.headBackOption)), true, true]; + }, + next: function(){ + var q = $(`[info=singleHeadBack${settings.headBackOption}]`); + settings.headBackOption = 1 - settings.headBackOption; + q.attr("info", "singleHeadBack" + (settings.headBackOption)); + q.html(languageOption.general["singleHeadBack" + (settings.headBackOption)]); + reinitSingleButton(); saveSettings(); + return [localize("singleHeadBackOptions" + (settings.headBackOption)), true, true]; + }, } }; String.prototype.format = function() { @@ -456,7 +480,8 @@ var currentDefaultSettings = { openNotification: true, useApiKeys: false, apiKey: "", - apiSecret: "" + apiSecret: "", + headBackOption: 0, }; function setAsDefault(op){ if(op == undefined) op = false; @@ -877,7 +902,7 @@ function toSmallInfo(x){ return ""; } function toDetailedInfo(x, ptType){ - if(x == undefined || x == "") return languageOption.compile["IN_QUEUE"]; + if(x == undefined || x == "" || x == null) return languageOption.compile["IN_QUEUE"]; if(x == "OK"){ if(ptType == "PRETESTS") return languageOption.compile["PRETEST_PASSED"]; diff --git a/js/submission.js b/js/submission.js index 72f61f8..7ffa1ed 100644 --- a/js/submission.js +++ b/js/submission.js @@ -13,10 +13,12 @@ function openSubmission(c, u){ setTimeout(function(){$(".submissionContainer").css("opacity", 1);}, 100); $(".submissionContainer > div:first-child > i").attr("class", 'fas fa-spin fa-sync-alt'); var data; + var submissionAjax; function loader(callback){ - $.ajax({ + submissionAjax = $.ajax({ url: settings.mainURL + `/${c >= 100000 ? "gym" : "contest"}/` + c + '/submission/' + u, success: function(j){ + submissionAjax = null; if(T.getTime() != submissionLastOperated.getTime()) return; data = $(j); if(j.indexOf(`data-entityId="${u}"`) == -1) @@ -24,6 +26,7 @@ function openSubmission(c, u){ setTimeout(callback, 100); }, error: function(){ + submissionAjax = null; if(T.getTime() != submissionLastOperated.getTime()) return; $(".submissionContainer > div:first-child > i").css("opacity", 0); setTimeout(function(){ @@ -64,8 +67,8 @@ function openSubmission(c, u){ $(".submissionLanguage").html(ctL.children().eq(3).text()); var pwp = ctL.children().eq(4); var vdl = ""; - pwp.children().each(function(){ - if($(this).attr("class") != undefined && $(this).attr("class").indexOf("verdict") != -1) + pwp.contents().each(function(){ + if(($(this).attr("class") != undefined && $(this).attr("class").indexOf("verdict") != -1) || $.trim($(this).text()) == "Compilation error") vdl += $(this).text(); }) $(".submissionVerdict").html(vdl); @@ -130,6 +133,8 @@ function openSubmission(c, u){ } $(".submissionCloser").unbind("click").click(function(){ submissionLastOperated = new Date(); + if(submissionAjax != null) + submissionAjax.abort(); $(".submissionContainer").css("opacity", 0); setTimeout(function(){$(".submissionContainer").css("display", "none");}, 500); }) diff --git a/package.json b/package.json index 7b16203..6b09d57 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "resizable": false, "show_in_taskbar": true, "width": 1000, - "height": 668, + "height": 658, "toolbar": true, "as_desktop": false, "position": "center", @@ -26,10 +26,10 @@ "single-instance": true, "main": "index.html", "chromium-args": "--disable-web-security --user-data-dir --disable-background-timer-throttling --disable-backgrounding-occluded-windows --disable-renderer-backgrounding", - "double-tap-to_zoom-enabled": false, + "double-tap-to-zoom-enabled": false, "webkit": { "page-cache": false, "plugin": true, "java": true } -} \ No newline at end of file +}