xmoj-script 1.2.49 → 1.2.51

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
@@ -2329,6 +2329,28 @@
2329
2329
  }
2330
2330
  ],
2331
2331
  "Notes": "No release notes were provided for this release."
2332
+ },
2333
+ "1.2.50": {
2334
+ "UpdateDate": 1723184583632,
2335
+ "Prerelease": true,
2336
+ "UpdateContents": [
2337
+ {
2338
+ "PR": 674,
2339
+ "Description": "Stop!"
2340
+ }
2341
+ ],
2342
+ "Notes": "No release notes were provided for this release."
2343
+ },
2344
+ "1.2.51": {
2345
+ "UpdateDate": 1723190703489,
2346
+ "Prerelease": true,
2347
+ "UpdateContents": [
2348
+ {
2349
+ "PR": 680,
2350
+ "Description": " 解决强制O2的问题"
2351
+ }
2352
+ ],
2353
+ "Notes": "No release notes were provided for this release."
2332
2354
  }
2333
2355
  }
2334
2356
  }
package/XMOJ.user.js CHANGED
@@ -1,6 +1,6 @@
1
1
  // ==UserScript==
2
2
  // @name XMOJ
3
- // @version 1.2.49
3
+ // @version 1.2.51
4
4
  // @description XMOJ增强脚本
5
5
  // @author @XMOJ-Script-dev, @langningchen and the community
6
6
  // @namespace https://github/langningchen
@@ -118,9 +118,6 @@ let RenderMathJax = async () => {
118
118
  }
119
119
  } catch (e) {
120
120
  console.error(e);
121
- if (UtilityEnabled("DebugMode")) {
122
- SmartAlert("XMOJ-Script internal error!\n\n" + e + "\n\n" + "If you see this message, please report it to the developer.\nDon't forget to include console logs and a way to reproduce the error!\n\nDon't want to see this message? Disable DebugMode.");
123
- }
124
121
  }
125
122
  };
126
123
  let GetUserInfo = async (Username) => {
@@ -2757,13 +2754,15 @@ async function main() {
2757
2754
  ErrorElement.style.display = "none";
2758
2755
  document.querySelector("#Submit").disabled = true;
2759
2756
  document.querySelector("#Submit").value = "正在提交...";
2757
+ let o2Switch="&enable_O2=on";
2758
+ if(!document.querySelector("#enable_O2").checked)o2Switch="";
2760
2759
  await fetch("https://www.xmoj.tech/submit.php", {
2761
2760
  "headers": {
2762
2761
  "content-type": "application/x-www-form-urlencoded"
2763
2762
  },
2764
2763
  "referrer": location.href,
2765
2764
  "method": "POST",
2766
- "body": (SearchParams.get("id") != null ? "id=" + SearchParams.get("id") : "cid=" + SearchParams.get("cid") + "&pid=" + SearchParams.get("pid")) + "&language=1&" + "source=" + encodeURIComponent(CodeMirrorElement.getValue()) + "&" + "enable_O2=on"
2765
+ "body": (SearchParams.get("id") != null ? "id=" + SearchParams.get("id") : "cid=" + SearchParams.get("cid") + "&pid=" + SearchParams.get("pid")) + "&language=1&" + "source=" + encodeURIComponent(CodeMirrorElement.getValue()) + o2Switch
2767
2766
  }).then(async (Response) => {
2768
2767
  if (Response.redirected) {
2769
2768
  location.href = Response.url;
@@ -2804,13 +2803,15 @@ async function main() {
2804
2803
  ErrorMessage.style.color = "red";
2805
2804
  ErrorMessage.innerText = "比赛已结束, 正在尝试像题目 " + rPID + " 提交";
2806
2805
  console.log("比赛已结束, 正在尝试像题目 " + rPID + " 提交");
2806
+ let o2Switch="&enable_O2=on";
2807
+ if(!document.querySelector("#enable_O2").checked)o2Switch="";
2807
2808
  await fetch("https://www.xmoj.tech/submit.php", {
2808
2809
  "headers": {
2809
2810
  "content-type": "application/x-www-form-urlencoded"
2810
2811
  },
2811
2812
  "referrer": location.href,
2812
2813
  "method": "POST",
2813
- "body": "id=" + rPID + "&language=1&" + "source=" + encodeURIComponent(CodeMirrorElement.getValue()) + "&" + "enable_O2=on"
2814
+ "body": "id=" + rPID + "&language=1&" + "source=" + encodeURIComponent(CodeMirrorElement.getValue()) + o2Switch
2814
2815
  }).then(async (Response) => {
2815
2816
  if (Response.redirected) {
2816
2817
  location.href = Response.url;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xmoj-script",
3
- "version": "1.2.49",
3
+ "version": "1.2.51",
4
4
  "description": "an improvement script for xmoj.tech",
5
5
  "main": "AddonScript.js",
6
6
  "scripts": {
@@ -1,24 +0,0 @@
1
- name: Check PR CI
2
-
3
- on:
4
- schedule:
5
- - cron: "*/10 * * * *"
6
-
7
- jobs:
8
- check-pr-ci:
9
- runs-on: ubuntu-latest
10
- steps:
11
- - uses: actions-cool/check-pr-ci@v1
12
- with:
13
- token: ${{ secrets.GITHUB_TOKEN }}
14
- # filter-label: 'check-ci'
15
- # filter-creator-authority: 'write'
16
- filter-head-ref: 'master, dev'
17
- filter-support-fork: true
18
- success-review: true
19
- success-review-body: 'PR passes all checks'
20
- success-merge: false
21
- conflict-review-body: 'PR has conflicts, please fix them first!'
22
- failure-review: 'REQUEST_CHANGES'
23
- failure-review-body: 'PR fails some checks'
24
- failure-close: false