xmoj-script 1.1.72 → 1.2.1

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.
package/Update.json CHANGED
@@ -1651,6 +1651,32 @@
1651
1651
  }
1652
1652
  ],
1653
1653
  "Notes": "Please note that users using DebugMode should update immediately. <br> The domain ghpages.xmoj-bbs.tech will be updated at a later date."
1654
+ },
1655
+ "1.2.0": {
1656
+ "UpdateDate": 1721638608232,
1657
+ "Prerelease": false,
1658
+ "UpdateContents": [
1659
+ {
1660
+ "PR": 550,
1661
+ "Description": "Improve debug mode"
1662
+ },
1663
+ {
1664
+ "PR": 552,
1665
+ "Description": "Update the api domain"
1666
+ }
1667
+ ],
1668
+ "Notes": "Please update immediately, thank you. <br>This release changes the api domain from xmoj-bbs.tech to xmoj-bbs.me"
1669
+ },
1670
+ "1.2.1": {
1671
+ "UpdateDate": 1721656184134,
1672
+ "Prerelease": true,
1673
+ "UpdateContents": [
1674
+ {
1675
+ "PR": 557,
1676
+ "Description": "更改获取数据体验(增加报错)"
1677
+ }
1678
+ ],
1679
+ "Notes": "No release notes were provided for this release."
1654
1680
  }
1655
1681
  }
1656
1682
  }
package/XMOJ.user.js CHANGED
@@ -1,6 +1,6 @@
1
1
  // ==UserScript==
2
2
  // @name XMOJ
3
- // @version 1.1.72
3
+ // @version 1.2.1
4
4
  // @description XMOJ增强脚本
5
5
  // @author @XMOJ-Script-dev, @langningchen and the community
6
6
  // @namespace https://github/langningchen
@@ -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`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xmoj-script",
3
- "version": "1.1.72",
3
+ "version": "1.2.1",
4
4
  "description": "an improvement script for xmoj.tech",
5
5
  "main": "AddonScript.js",
6
6
  "scripts": {