xmoj-script 1.1.68 → 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 +37 -0
- package/XMOJ.user.js +12 -10
- package/index.html +7 -1
- package/package.json +1 -1
package/Update.json
CHANGED
@@ -1603,6 +1603,43 @@
|
|
1603
1603
|
}
|
1604
1604
|
],
|
1605
1605
|
"Notes": "No release notes were provided for this release."
|
1606
|
+
},
|
1607
|
+
"1.1.69": {
|
1608
|
+
"UpdateDate": 1719815069812,
|
1609
|
+
"Prerelease": true,
|
1610
|
+
"UpdateContents": [
|
1611
|
+
{
|
1612
|
+
"PR": 546,
|
1613
|
+
"Description": "fix memory displays"
|
1614
|
+
}
|
1615
|
+
],
|
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."
|
1606
1643
|
}
|
1607
1644
|
}
|
1608
1645
|
}
|
package/XMOJ.user.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
// ==UserScript==
|
2
2
|
// @name XMOJ
|
3
|
-
// @version 1.1.
|
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
|
@@ -254,13 +254,13 @@ let StringToSeconds = (InputString) => {
|
|
254
254
|
let SizeToStringSize = (Memory) => {
|
255
255
|
if (UtilityEnabled("AddUnits")) {
|
256
256
|
if (Memory < 1024) {
|
257
|
-
return Memory + "
|
257
|
+
return Memory + "KB";
|
258
258
|
} else if (Memory < 1024 * 1024) {
|
259
|
-
return (Memory / 1024).toFixed(2) + "
|
259
|
+
return (Memory / 1024).toFixed(2) + "MB";
|
260
260
|
} else if (Memory < 1024 * 1024 * 1024) {
|
261
|
-
return (Memory / 1024 / 1024).toFixed(2) + "
|
261
|
+
return (Memory / 1024 / 1024).toFixed(2) + "GB";
|
262
262
|
} else {
|
263
|
-
return (Memory / 1024 / 1024 / 1024).toFixed(2) + "
|
263
|
+
return (Memory / 1024 / 1024 / 1024).toFixed(2) + "TB";
|
264
264
|
}
|
265
265
|
} else {
|
266
266
|
return Memory;
|
@@ -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", {}
|
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
|
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">
|