xmoj-script 1.2.0 → 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/Update.json +1689 -1668
  2. package/XMOJ.user.js +15 -2
  3. package/package.json +1 -1
package/XMOJ.user.js CHANGED
@@ -1,6 +1,6 @@
1
1
  // ==UserScript==
2
2
  // @name XMOJ
3
- // @version 1.2.0
3
+ // @version 1.2.2
4
4
  // @description XMOJ增强脚本
5
5
  // @author @XMOJ-Script-dev, @langningchen and the community
6
6
  // @namespace https://github/langningchen
@@ -21,7 +21,7 @@
21
21
  // @grant GM_setValue
22
22
  // @grant GM_getValue
23
23
  // @homepage https://www.xmoj-bbs.me/
24
- // @supportURL https://xmojscript.zohodesk.com/portal/zh/newticket
24
+ // @supportURL https://github.com/XMOJ-Script-dev/XMOJ-Script/issues
25
25
  // @connect api.xmoj-bbs.tech
26
26
  // @connect api.xmoj-bbs.me
27
27
  // @connect challenges.cloudflare.com
@@ -3277,6 +3277,15 @@ async function main() {
3277
3277
  GetDataButton.disabled = true;
3278
3278
  GetDataButton.innerText = "正在获取数据...";
3279
3279
  let PID = localStorage.getItem("UserScript-Solution-" + SearchParams.get("sid") + "-Problem");
3280
+ if (PID == null) {
3281
+ GetDataButton.innerText = "失败! 无法获取PID";
3282
+ GetDataButton.disabled = false;
3283
+ await new Promise((resolve) => {
3284
+ setTimeout(resolve, 800);
3285
+ });
3286
+ GetDataButton.innerText = "获取数据";
3287
+ return;
3288
+ }
3280
3289
  let Code = "";
3281
3290
  if (localStorage.getItem(`UserScript-Problem-${PID}-IOFilename`) !== null) {
3282
3291
  Code = `#define IOFile "${localStorage.getItem(`UserScript-Problem-${PID}-IOFilename`)}"\n`;
@@ -3425,6 +3434,10 @@ int main()
3425
3434
  "Name": "RedPanda C++",
3426
3435
  "Image": "https://a.fsdn.com/allura/p/redpanda-cpp/icon",
3427
3436
  "URL": "https://sourceforge.net/projects/redpanda-cpp/"
3437
+ }, {
3438
+ "Name": "CLion",
3439
+ "Image": "https://resources.jetbrains.com/storage/products/company/brand/logos/CLion_icon.png",
3440
+ "URL": "https://www.jetbrains.com/clion/download"
3428
3441
  }, {
3429
3442
  "Name": "CP Editor",
3430
3443
  "Image": "https://a.fsdn.com/allura/mirror/cp-editor/icon",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xmoj-script",
3
- "version": "1.2.0",
3
+ "version": "1.2.2",
4
4
  "description": "an improvement script for xmoj.tech",
5
5
  "main": "AddonScript.js",
6
6
  "scripts": {