xmoj-script 1.1.69 → 1.1.71

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
@@ -1614,6 +1614,32 @@
1614
1614
  }
1615
1615
  ],
1616
1616
  "Notes": "No release notes were provided for this release."
1617
+ },
1618
+ "1.1.70": {
1619
+ "UpdateDate": 1719815850792,
1620
+ "Prerelease": false,
1621
+ "UpdateContents": [
1622
+ {
1623
+ "PR": 544,
1624
+ "Description": "fix https://www.xmoj.tech/open_contest_sign_up.php"
1625
+ },
1626
+ {
1627
+ "PR": 546,
1628
+ "Description": "fix memory displays"
1629
+ }
1630
+ ],
1631
+ "Notes": "No release notes were provided for this release."
1632
+ },
1633
+ "1.1.71": {
1634
+ "UpdateDate": 1719843873067,
1635
+ "Prerelease": true,
1636
+ "UpdateContents": [
1637
+ {
1638
+ "PR": 550,
1639
+ "Description": "Improve debug mode"
1640
+ }
1641
+ ],
1642
+ "Notes": "No release notes were provided for this release."
1617
1643
  }
1618
1644
  }
1619
1645
  }
package/XMOJ.user.js CHANGED
@@ -1,6 +1,6 @@
1
1
  // ==UserScript==
2
2
  // @name XMOJ
3
- // @version 1.1.69
3
+ // @version 1.1.71
4
4
  // @description XMOJ增强脚本
5
5
  // @author @XMOJ-Script-dev, @langningchen and the community
6
6
  // @namespace https://github/langningchen
@@ -337,6 +337,9 @@ let RequestAPI = (Action, Data, CallBack) => {
337
337
  }, "Data": Data, "Version": GM_info.script.version, "DebugMode": UtilityEnabled("DebugMode")
338
338
  };
339
339
  let DataString = JSON.stringify(PostData);
340
+ if (UtilityEnabled("DebugMode")) {
341
+ console.log("Sent for", Action + ":", DataString);
342
+ }
340
343
  GM_xmlhttpRequest({
341
344
  method: "POST",
342
345
  url: (UtilityEnabled("SuperDebug") ? "http://127.0.0.1:8787/" : "https://api.xmoj-bbs.tech/") + Action,
@@ -345,6 +348,9 @@ let RequestAPI = (Action, Data, CallBack) => {
345
348
  },
346
349
  data: DataString,
347
350
  onload: (Response) => {
351
+ if (UtilityEnabled("DebugMode")) {
352
+ console.log("Received for", Action + ":", Response.responseText);
353
+ }
348
354
  try {
349
355
  CallBack(JSON.parse(Response.responseText));
350
356
  } catch (Error) {
@@ -427,11 +433,7 @@ async function main() {
427
433
  document.querySelector("#navbar > ul:nth-child(1) > li:nth-child(2) > a").innerText = "题库";
428
434
  }
429
435
  //send analytics
430
- RequestAPI("SendData", {}, (result) => {
431
- if (UtilityEnabled("DebugMode")) {
432
- console.log(result);
433
- }
434
- });
436
+ RequestAPI("SendData", {});
435
437
  if (UtilityEnabled("ReplaceLinks")) {
436
438
  document.body.innerHTML = String(document.body.innerHTML).replaceAll(/\[<a href="([^"]*)">([^<]*)<\/a>\]/g, "<button onclick=\"location.href='$1'\" class=\"btn btn-outline-secondary\">$2</button>");
437
439
  }
package/index.html CHANGED
@@ -3,7 +3,13 @@
3
3
  <link rel="icon" href="favicon.ico">
4
4
 
5
5
  <head>
6
- <script async defer src="https://status.xmoj-bbs.tech/tracker.js" data-website-id="clunj16ni0001mc46melouphl"></script>
6
+ <script type="text/javascript">
7
+ (function(c,l,a,r,i,t,y){
8
+ c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};
9
+ t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i;
10
+ y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y);
11
+ })(window, document, "clarity", "script", "mdy1fivbnd");
12
+ </script>
7
13
  <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-6214673028530012"
8
14
  crossorigin="anonymous"></script>
9
15
  <meta name="viewport" content="width=device-width">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xmoj-script",
3
- "version": "1.1.69",
3
+ "version": "1.1.71",
4
4
  "description": "an improvement script for xmoj.tech",
5
5
  "main": "AddonScript.js",
6
6
  "scripts": {