xmoj-script 1.2.48 → 1.2.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.
- package/Update.json +11 -0
- package/XMOJ.user.js +2 -21
- package/package.json +1 -1
package/Update.json
CHANGED
|
@@ -2318,6 +2318,17 @@
|
|
|
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."
|
|
2321
2332
|
}
|
|
2322
2333
|
}
|
|
2323
2334
|
}
|
package/XMOJ.user.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// ==UserScript==
|
|
2
2
|
// @name XMOJ
|
|
3
|
-
// @version 1.2.
|
|
3
|
+
// @version 1.2.49
|
|
4
4
|
// @description XMOJ增强脚本
|
|
5
5
|
// @author @XMOJ-Script-dev, @langningchen and the community
|
|
6
6
|
// @namespace https://github/langningchen
|
|
@@ -2772,26 +2772,7 @@ async function main() {
|
|
|
2772
2772
|
if (text.indexOf("没有这个比赛!") !== -1 && new URL(location.href).searchParams.get("pid") !== null) {
|
|
2773
2773
|
// Credit: https://github.com/boomzero/quicksubmit/blob/main/index.ts
|
|
2774
2774
|
// 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
|
-
);
|
|
2775
|
+
const contestReq = await fetch("https://www.xmoj.tech/contest.php?cid=" + new URL(location.href).searchParams.get("cid"));
|
|
2795
2776
|
const res = await contestReq.text();
|
|
2796
2777
|
if (
|
|
2797
2778
|
contestReq.status !== 200 ||
|