From 70bb00f250a9c953e68c223d2a8bc0f8e892e4e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=AE=8B=E9=98=B3=E5=A6=82=E8=A1=80?= <2824671438@qq.com> Date: Thu, 18 Aug 2022 23:14:29 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=9C=A8=E7=99=BB=E5=BD=95=E6=88=96?= =?UTF-8?q?=E5=8A=A0=E8=BD=BD=E7=99=BB=E5=BD=95=E7=8A=B6=E6=80=81=E6=88=90?= =?UTF-8?q?=E5=8A=9F=E5=90=8E=EF=BC=8C=E5=B0=86=E2=80=9C=E7=AE=80=E4=BB=8B?= =?UTF-8?q?=E2=80=9D=E9=A1=B5=E9=9D=A2=E6=94=B9=E4=B8=BA=E8=87=AA=E5=B7=B1?= =?UTF-8?q?=E7=9A=84=E3=80=82=E4=BD=86=E6=98=AF=E4=B8=8D=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/authorize.js | 2 ++ js/profile.js | 15 +++++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/js/authorize.js b/js/authorize.js index 272186a..376ff07 100644 --- a/js/authorize.js +++ b/js/authorize.js @@ -17,6 +17,7 @@ function loadLoginType(){ currentLoginHandle = hdl; if(problemNewWinLoaded) initProblemNewWin(); $(".settingsLoginType").html(`${languageOption.general.currentUser.format([hdl])}`); + infoLoadUsername(currentLoginHandle,true); } else{ currentLoginHandle = ""; @@ -122,6 +123,7 @@ function submitLogin(){ currentLoginHandle = hdl; if(problemNewWinLoaded) initProblemNewWin(); $(".settingsLoginType").html(`${languageOption.general.currentUser.format([hdl])}`); + infoLoadUsername(currentLoginHandle,true); }, error: function(){ $(".settingsLoginButton").html(`${languageOption.error.errorLoginFailed}`); diff --git a/js/profile.js b/js/profile.js index 9b7f8d5..0c4d325 100644 --- a/js/profile.js +++ b/js/profile.js @@ -1013,12 +1013,15 @@ $(".profileSubmissionPageRight").click(function(){ profileRefreshSubmissionListPages(); }); -function infoLoadUsername(un){ - $(".infoContent > .contentRowInfo").css("left", "-920px"); - $("[for=infoContent]").click(); - for(var i=0; i<=2; i++) - if(profileInfoLoaders[i] != null) - profileInfoLoaders[i].abort(); +function infoLoadUsername(un,donot_jump=false){ + if(!donot_jump) + { + $(".infoContent > .contentRowInfo").css("left", "-920px"); + $("[for=infoContent]").click(); + for(var i=0; i<=2; i++) + if(profileInfoLoaders[i] != null) + profileInfoLoaders[i].abort(); + } var hCode = (new Date()).getTime(); profileInfoCurrentAsked = un + '#' + hCode; delete(profileInfoDatas[0]); From b822e17f427d6daa6c00e5b97a2d1074d4908cdb Mon Sep 17 00:00:00 2001 From: tiger2005 <41613797+tiger2005@users.noreply.github.com> Date: Sat, 27 Aug 2022 00:11:42 +0800 Subject: [PATCH 2/3] Update README.md --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 42120e0..ea7709b 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,6 @@ See license [here](https://github.com/CodeforcesContestHelper/CCHv2/blob/main/LI ## Donation https://afdian.net/@cfcontesthelper -## Chatting +## Star History -- Discord: [click here](https://discord.gg/natZEphAmS) -- QQ: group number: 458610798 +[![Star History Chart](https://api.star-history.com/svg?repos=CodeforcesContestHelper/CCHv2&type=Date)](https://star-history.com/#CodeforcesContestHelper/CCHv2) From b7bc2d72f177f47f4b36f6826e4e93ddcefeddd8 Mon Sep 17 00:00:00 2001 From: cyrxdzj <2824671438@qq.com> Date: Fri, 6 Jan 2023 16:37:16 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=B8=80=E9=A1=B9?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=EF=BC=8C=E8=AE=A9=E7=94=A8=E6=88=B7=E5=86=B3?= =?UTF-8?q?=E5=AE=9A=E6=98=AF=E5=90=A6=E5=9C=A8=E7=99=BB=E5=BD=95=E6=97=B6?= =?UTF-8?q?=E5=8A=A0=E8=BD=BD=E4=B8=AA=E4=BA=BA=E7=AE=80=E4=BB=8B=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 10 ++++++++++ js/authorize.js | 10 ++++++++-- js/locale.js | 8 ++++++++ js/settings.js | 11 +++++++++++ 4 files changed, 37 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index d868a8e..f325418 100644 --- a/index.html +++ b/index.html @@ -1102,6 +1102,16 @@ +
+
+
Radio Name
+
Radio Addition
+
+
+ + +
+
diff --git a/js/authorize.js b/js/authorize.js index 376ff07..af39435 100644 --- a/js/authorize.js +++ b/js/authorize.js @@ -17,7 +17,10 @@ function loadLoginType(){ currentLoginHandle = hdl; if(problemNewWinLoaded) initProblemNewWin(); $(".settingsLoginType").html(`${languageOption.general.currentUser.format([hdl])}`); - infoLoadUsername(currentLoginHandle,true); + if(settings.loadMyInfoWhenLogin) + { + infoLoadUsername(currentLoginHandle,true); + } } else{ currentLoginHandle = ""; @@ -123,7 +126,10 @@ function submitLogin(){ currentLoginHandle = hdl; if(problemNewWinLoaded) initProblemNewWin(); $(".settingsLoginType").html(`${languageOption.general.currentUser.format([hdl])}`); - infoLoadUsername(currentLoginHandle,true); + if(settings.loadMyInfoWhenLogin) + { + infoLoadUsername(currentLoginHandle,true); + } }, error: function(){ $(".settingsLoginButton").html(`${languageOption.error.errorLoginFailed}`); diff --git a/js/locale.js b/js/locale.js index 8e23622..fe037a0 100644 --- a/js/locale.js +++ b/js/locale.js @@ -322,6 +322,10 @@ var lang_en = { " Open Notification", "Choose if notifications of hacks, contest notifications or submission results should be sent." ], + loadMyInfoWhenLogin: [ + " Load introduction when logging in", + "In order to avoid opening the profile to see a blank, but also click to change the user.It may consume a little bit of mobile data." + ], useApiKeys: [ " Use API Keys", "Enable to authorize APIs to fetch private informations. You can go to /settings/api to generate API keys. We will not use your keys for other purposes." @@ -708,6 +712,10 @@ var lang_zh = { " 开启提醒", "选择是否发送包含 hack,比赛通知或者提交结果的提醒。" ], + loadMyInfoWhenLogin: [ + " 登录时自动加载个人简介", + "免得打开个人简介时看到一片空白,还要点击更换用户。这可能会需要一点流量。" + ], useApiKeys: [ " 使用 API Keys", "开启后可以给 API 授权以加载私人内容。你可以前往 /settings/api 生成 API Keys。我们保证不会将其用于其他用途。" diff --git a/js/settings.js b/js/settings.js index 733c250..2fc2b2a 100644 --- a/js/settings.js +++ b/js/settings.js @@ -454,6 +454,16 @@ var settingsFunctions = { return settings.openNotification; } }, + loadMyInfoWhenLogin: { + initial: function(){ + return settings.loadMyInfoWhenLogin; + }, + change: function(){ + settings.loadMyInfoWhenLogin = !settings.loadMyInfoWhenLogin; + saveSettings(); + return settings.loadMyInfoWhenLogin; + } + }, useApiKeys: { initial: function(){ return settings.useApiKeys; @@ -530,6 +540,7 @@ var currentDefaultSettings = { statementFontSize: 16, statementDefaultLanguage: 50, openNotification: true, + loadMyInfoWhenLogin: false, useApiKeys: false, apiKey: "", apiSecret: "",