Skip to content

Commit

Permalink
make the upload_std interface prettier (#393)
Browse files Browse the repository at this point in the history
* rel notes

* make the std interface better

* 1.1.24

* Update version info to 1.1.24

* don't lie

* Update time and description of 1.1.24

* Update time and description of 1.1.24

---------

Signed-off-by: Zhu Chenrui <Thomas_rainbowfish@icloud.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
boomzero and github-actions[bot] authored Jan 26, 2024
1 parent e82d261 commit a484597
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 7 deletions.
13 changes: 11 additions & 2 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions Update.json
Original file line number Diff line number Diff line change
Expand Up @@ -1060,6 +1060,17 @@
}
],
"Notes": "No release notes were provided for this release."
},
"1.1.24": {
"UpdateDate": 1706245175892,
"Prerelease": true,
"UpdateContents": [
{
"PR": 393,
"Description": "make the upload_std interface prettier"
}
],
"Notes": "No release notes were provided for this release."
}
}
}
7 changes: 3 additions & 4 deletions XMOJ.user.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ==UserScript==
// @name XMOJ
// @version 1.1.23
// @version 1.1.24
// @description XMOJ增强脚本
// @author @XMOJ-Script-dev, @langningchen and the community
// @namespace https://github/langningchen
Expand Down Expand Up @@ -2833,7 +2833,6 @@ else {
<p class="mt-2 text-muted">
您必须要上传标程以后才能使用“查看标程”功能。点击“上传标程”按钮以后,系统会自动上传标程,请您耐心等待。<br>
首次上传标程可能会比较慢,请耐心等待。后续上传标程将会快很多。请不要直接抄袭或递交标程,否则会给予"作弊者"badge的惩罚!<br>
上传的内容不是您AC的程序,而是您AC的题目对应的用户std的程序。所以您可以放心上传,不会泄露您的代码。<br>
系统每过30天会自动提醒您上传标程,您必须要上传标程,否则将会被禁止使用“查看标程”功能。<br>
</p>`;
UploadStd.addEventListener("click", async () => {
Expand Down Expand Up @@ -2863,14 +2862,14 @@ else {
if (Result.Success) {
let StdList = Result.Data.StdList;
for (let i = 0; i < ACList.length; i++) {
if (StdList.indexOf(ACList[i]) === -1) {
if (StdList.indexOf(ACList[i]) === -1 && ACList[i] !== 0) {
await new Promise((Resolve) => {
RequestAPI("UploadStd", {
"ProblemID": Number(ACList[i])
}, (Result) => {
if (!Result.Success) {
ErrorElement.style.display = "block";
ErrorElement.innerText += Result.Message + "<br>";
ErrorElement.innerText += Result.Message + "\n";
UploadProgress.classList.add("bg-warning");
}
UploadProgress.innerText = (i / ACList.length * 100).toFixed(1) + "% (" + ACList[i] + ")";
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "xmoj-script",
"version": "1.1.23",
"version": "1.1.24",
"description": "an improvement script for xmoj.tech",
"main": "AddonScript.js",
"scripts": {
Expand Down

0 comments on commit a484597

Please sign in to comment.