xmoj-script 1.2.48 → 1.2.50

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
@@ -2318,6 +2318,28 @@
2318
2318
  }
2319
2319
  ],
2320
2320
  "Notes": "No release notes were provided for this release."
2321
+ },
2322
+ "1.2.49": {
2323
+ "UpdateDate": 1723184271477,
2324
+ "Prerelease": true,
2325
+ "UpdateContents": [
2326
+ {
2327
+ "PR": 673,
2328
+ "Description": "Remove headers"
2329
+ }
2330
+ ],
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."
2321
2343
  }
2322
2344
  }
2323
2345
  }
package/XMOJ.user.js CHANGED
@@ -1,6 +1,6 @@
1
1
  // ==UserScript==
2
2
  // @name XMOJ
3
- // @version 1.2.48
3
+ // @version 1.2.50
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) => {
@@ -2772,26 +2769,7 @@ async function main() {
2772
2769
  if (text.indexOf("没有这个比赛!") !== -1 && new URL(location.href).searchParams.get("pid") !== null) {
2773
2770
  // Credit: https://github.com/boomzero/quicksubmit/blob/main/index.ts
2774
2771
  // Also licensed under GPL-3.0
2775
- const contestReq = await fetch(
2776
- "https://www.xmoj.tech/contest.php?cid=" + new URL(location.href).searchParams.get("cid"),
2777
- {
2778
- "credentials": "include",
2779
- "headers": {
2780
- "User-Agent":
2781
- "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:121.0) Gecko/20100101 Firefox/121.0",
2782
- "Accept":
2783
- "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8",
2784
- "Accept-Language": "en-US,en;q=0.5",
2785
- "Upgrade-Insecure-Requests": "1",
2786
- "Sec-Fetch-Dest": "document",
2787
- "Sec-Fetch-Mode": "navigate",
2788
- "Sec-Fetch-Site": "same-origin"
2789
- },
2790
- "referrer": "https://www.xmoj.tech/contest.php",
2791
- "method": "GET",
2792
- "mode": "cors",
2793
- },
2794
- );
2772
+ const contestReq = await fetch("https://www.xmoj.tech/contest.php?cid=" + new URL(location.href).searchParams.get("cid"));
2795
2773
  const res = await contestReq.text();
2796
2774
  if (
2797
2775
  contestReq.status !== 200 ||
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xmoj-script",
3
- "version": "1.2.48",
3
+ "version": "1.2.50",
4
4
  "description": "an improvement script for xmoj.tech",
5
5
  "main": "AddonScript.js",
6
6
  "scripts": {