xmoj-script 1.1.24 → 1.1.25
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 +6 -6
- package/package.json +1 -1
package/Update.json
CHANGED
@@ -1071,6 +1071,17 @@
|
|
1071
1071
|
}
|
1072
1072
|
],
|
1073
1073
|
"Notes": "No release notes were provided for this release."
|
1074
|
+
},
|
1075
|
+
"1.1.25": {
|
1076
|
+
"UpdateDate": 1706250229435,
|
1077
|
+
"Prerelease": true,
|
1078
|
+
"UpdateContents": [
|
1079
|
+
{
|
1080
|
+
"PR": 394,
|
1081
|
+
"Description": "fix problemstatus"
|
1082
|
+
}
|
1083
|
+
],
|
1084
|
+
"Notes": "No release notes were provided for this release."
|
1074
1085
|
}
|
1075
1086
|
}
|
1076
1087
|
}
|
package/XMOJ.user.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
// ==UserScript==
|
2
2
|
// @name XMOJ
|
3
|
-
// @version 1.1.
|
3
|
+
// @version 1.1.25
|
4
4
|
// @description XMOJ增强脚本
|
5
5
|
// @author @XMOJ-Script-dev, @langningchen and the community
|
6
6
|
// @namespace https://github/langningchen
|
@@ -3404,15 +3404,15 @@ int main()
|
|
3404
3404
|
}
|
3405
3405
|
|
3406
3406
|
|
3407
|
-
let CurrentPage = parseInt(SearchParams.get("page") ||
|
3407
|
+
let CurrentPage = parseInt(SearchParams.get("page") || 0);
|
3408
3408
|
let PID = Number(SearchParams.get("id"));
|
3409
3409
|
let Pagination = `<nav class="center"><ul class="pagination justify-content-center">`;
|
3410
|
-
if (CurrentPage
|
3411
|
-
Pagination += `<li class="page-item"><a href="https://www.xmoj.tech/problemstatus.php?id=${PID + `&page=
|
3410
|
+
if (CurrentPage !== 0) {
|
3411
|
+
Pagination += `<li class="page-item"><a href="https://www.xmoj.tech/problemstatus.php?id=${PID + `&page=0" class="page-link">«</a></li><li class="page-item"><a href="https://www.xmoj.tech/problemstatus.php?id=` + PID + `&page=` + (CurrentPage - 1) + `" class="page-link">` + (CurrentPage)}</a></li>`;
|
3412
3412
|
}
|
3413
|
-
Pagination += `<li class="active page-item"><a href="https://www.xmoj.tech/problemstatus.php?id=${PID + `&page=` + CurrentPage + `" class="page-link">` + CurrentPage}</a></li>`;
|
3413
|
+
Pagination += `<li class="active page-item"><a href="https://www.xmoj.tech/problemstatus.php?id=${PID + `&page=` + CurrentPage + `" class="page-link">` + (CurrentPage + 1)}</a></li>`;
|
3414
3414
|
if (document.querySelector("#problemstatus > tbody").children != null && document.querySelector("#problemstatus > tbody").children.length == 20) {
|
3415
|
-
Pagination += `<li class="page-item"><a href="https://www.xmoj.tech/problemstatus.php?id=${PID + `&page=` + (CurrentPage + 1) + `" class="page-link">` + (CurrentPage +
|
3415
|
+
Pagination += `<li class="page-item"><a href="https://www.xmoj.tech/problemstatus.php?id=${PID + `&page=` + (CurrentPage + 1) + `" class="page-link">` + (CurrentPage + 2) + `</a></li><li class="page-item"><a href="https://www.xmoj.tech/problemstatus.php?id=` + PID + `&page=` + (CurrentPage + 1)}" class="page-link">»</a></li>`;
|
3416
3416
|
}
|
3417
3417
|
Pagination += `</ul></nav>`;
|
3418
3418
|
document.querySelector("body > div > div.mt-3 > center").innerHTML += Pagination;
|