Skip to content

Commit

Permalink
sleep for a sec after submitting to prevent xmoj from crashing (#378)
Browse files Browse the repository at this point in the history
* rel notes

* 1.1.22

* Update version info to 1.1.22

---------

Signed-off-by: Zhu Chenrui <85378277+boomzero@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
boomzero and github-actions[bot] authored Jan 23, 2024
1 parent b5dbf83 commit ed0ba19
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 18 deletions.
56 changes: 40 additions & 16 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 @@ -1038,6 +1038,17 @@
}
],
"Notes": "Oops, sorry. I forgot to add the spellcheck some text fields. Anyway, it's fixed now. 😅"
},
"1.1.22": {
"UpdateDate": 1705983862747,
"Prerelease": true,
"UpdateContents": [
{
"PR": 378,
"Description": "sleep for a sec after submitting to prevent xmoj from crashing"
}
],
"Notes": "No release notes were provided for this release."
}
}
}
4 changes: 3 additions & 1 deletion XMOJ.user.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ==UserScript==
// @name XMOJ
// @version 1.1.21
// @version 1.1.22
// @description XMOJ增强脚本
// @author @XMOJ-Script-dev, @langningchen and the community
// @namespace https://github/langningchen
Expand Down Expand Up @@ -1860,6 +1860,8 @@ else {
"source=" + encodeURIComponent(Code) + "&" +
"enable_O2=on"
});
//sleep for one second
await new Promise(r => setTimeout(r, 500));
}
if (!Submitted) {
AutoCheatButton.innerHTML = "没有可以提交的题目!";
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.21",
"version": "1.1.22",
"description": "an improvement script for xmoj.tech",
"main": "AddonScript.js",
"scripts": {
Expand Down

0 comments on commit ed0ba19

Please sign in to comment.