xmoj-script 1.1.47 → 1.1.49

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.
@@ -13,7 +13,7 @@ jobs:
13
13
  pull-requests: write
14
14
  steps:
15
15
  - name: 'Create PR'
16
- uses: actions/github-script@v6
16
+ uses: actions/github-script@v7
17
17
  with:
18
18
  script: |
19
19
  const { repo, owner } = context.repo;
package/Update.json CHANGED
@@ -1333,13 +1333,24 @@
1333
1333
  ],
1334
1334
  "Notes": "A lot of QoL improvements!"
1335
1335
  },
1336
- "1.1.47": {
1337
- "UpdateDate": 1708774235039,
1336
+ "1.1.48": {
1337
+ "UpdateDate": 1709370871510,
1338
1338
  "Prerelease": true,
1339
1339
  "UpdateContents": [
1340
1340
  {
1341
- "PR": 476,
1342
- "Description": "新增下载项并且允许管理员用户直接获取标程"
1341
+ "PR": 485,
1342
+ "Description": "and I am so frustrated I actually make another code contribution"
1343
+ }
1344
+ ],
1345
+ "Notes": "No release notes were provided for this release."
1346
+ },
1347
+ "1.1.49": {
1348
+ "UpdateDate": 1709371832051,
1349
+ "Prerelease": true,
1350
+ "UpdateContents": [
1351
+ {
1352
+ "PR": 486,
1353
+ "Description": "fix showsource"
1343
1354
  }
1344
1355
  ],
1345
1356
  "Notes": "No release notes were provided for this release."
package/XMOJ.user.js CHANGED
@@ -1,6 +1,6 @@
1
1
  // ==UserScript==
2
2
  // @name XMOJ
3
- // @version 1.1.47
3
+ // @version 1.1.49
4
4
  // @description XMOJ增强脚本
5
5
  // @author @XMOJ-Script-dev, @langningchen and the community
6
6
  // @namespace https://github/langningchen
@@ -1631,7 +1631,7 @@ async function main() {
1631
1631
  TempHTML += "</a>";
1632
1632
  if (Points[SolutionID] != undefined) {
1633
1633
  TempHTML += "<span style=\"margin-left: 5px\" class=\"badge text-bg-info\">" + Points[SolutionID] + "</span>";
1634
- if ((Points[SolutionID].substring(0, Points[SolutionID].length - 1) >= 50)||(IsAdmin)) {
1634
+ if (Points[SolutionID].substring(0, Points[SolutionID].length - 1) >= 50) {
1635
1635
  TempHTML += `<a href="https://www.xmoj.tech/showsource.php?pid=${PID}&ByUserScript=1" class="ms-1 link-secondary">查看标程</a>`;
1636
1636
  }
1637
1637
  }
@@ -1865,6 +1865,7 @@ async function main() {
1865
1865
  let ParsedDocument = new DOMParser().parseFromString(Result, "text/html");
1866
1866
  SID = ParsedDocument.querySelector("#result-tab > tbody > tr:nth-child(1) > td:nth-child(2)").innerText;
1867
1867
  });
1868
+ await new Promise(r => setTimeout(r, 500));
1868
1869
  let Code = "";
1869
1870
  await fetch("https://www.xmoj.tech/getsource.php?id=" + SID)
1870
1871
  .then((Response) => {
@@ -1872,6 +1873,7 @@ async function main() {
1872
1873
  }).then((Response) => {
1873
1874
  Code = Response.substring(0, Response.indexOf("/**************************************************************")).trim();
1874
1875
  });
1876
+ await new Promise(r => setTimeout(r, 500));
1875
1877
  await fetch("https://www.xmoj.tech/submit.php", {
1876
1878
  "headers": {
1877
1879
  "content-type": "application/x-www-form-urlencoded"
@@ -1880,7 +1882,6 @@ async function main() {
1880
1882
  "method": "POST",
1881
1883
  "body": "cid=" + CID + "&pid=" + i + "&" + "language=1&" + "source=" + encodeURIComponent(Code) + "&" + "enable_O2=on"
1882
1884
  });
1883
- //sleep for one second
1884
1885
  await new Promise(r => setTimeout(r, 500));
1885
1886
  }
1886
1887
  if (!Submitted) {
@@ -3412,10 +3413,6 @@ int main()
3412
3413
  "Name": "Visual Studio Code",
3413
3414
  "Image": "https://code.visualstudio.com/favicon.ico",
3414
3415
  "URL": "https://code.visualstudio.com/Download"
3415
- }, {
3416
- "Name": "Microsoft Visual Studio",
3417
- "Image": "https://visualstudio.microsoft.com/wp-content/uploads/2021/10/Product-Icon.svg",
3418
- "URL": "https://visualstudio.microsoft.com/zh-hans/"
3419
3416
  }, {
3420
3417
  "Name": "Lazarus",
3421
3418
  "Image": "https://a.fsdn.com/allura/p/lazarus/icon",
@@ -3432,14 +3429,6 @@ int main()
3432
3429
  "Name": "VirtualBox",
3433
3430
  "Image": "https://www.virtualbox.org/graphics/vbox_logo2_gradient.png",
3434
3431
  "URL": "https://www.virtualbox.org/wiki/Downloads"
3435
- }, {
3436
- "Name": "VMware Workstation Pro",
3437
- "Image": "https://www.vmware.com/content/dam/digitalmarketing/vmware/en/images/gallery/thumbnails/tn-vmware-workstation-pro.png",
3438
- "URL": "https://www.vmware.com/go/getworkstation-win"
3439
- }, {
3440
- "Name": "VMware Workstation Pro - Product Key",
3441
- "Image": "https://www.vmware.com/content/dam/digitalmarketing/vmware/en/images/gallery/illustrations/illu-tech-laptop-whtbg.png",
3442
- "URL": "https://raw.githubusercontent.com/zhouyiqing0304/VMware-Workstation-Pro-Action-Keys/main/README.md"
3443
3432
  }, {
3444
3433
  "Name": "MinGW",
3445
3434
  "Image": "https://www.mingw-w64.org/logo.svg",
@@ -3578,7 +3567,7 @@ int main()
3578
3567
  .then((Response) => {
3579
3568
  return Response.text();
3580
3569
  }).then((Response) => {
3581
- Code = Response.substring(0, Response.indexOf("/**************************************************************")).trim();
3570
+ Code = Response;
3582
3571
  });
3583
3572
  } else {
3584
3573
  if (localStorage.getItem("UserScript-LastUploadedStdTime") === undefined || new Date().getTime() - localStorage.getItem("UserScript-LastUploadedStdTime") > 1000 * 60 * 60 * 24 * 30) {
@@ -4619,4 +4608,4 @@ int main()
4619
4608
  }
4620
4609
  }
4621
4610
 
4622
- main();
4611
+ main();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xmoj-script",
3
- "version": "1.1.47",
3
+ "version": "1.1.49",
4
4
  "description": "an improvement script for xmoj.tech",
5
5
  "main": "AddonScript.js",
6
6
  "scripts": {