xmoj-script 1.2.2 → 1.2.3
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 +7 -6
- package/package.json +1 -1
package/Update.json
CHANGED
@@ -1688,6 +1688,17 @@
|
|
1688
1688
|
}
|
1689
1689
|
],
|
1690
1690
|
"Notes": "No release notes were provided for this release."
|
1691
|
+
},
|
1692
|
+
"1.2.3": {
|
1693
|
+
"UpdateDate": 1722003346568,
|
1694
|
+
"Prerelease": true,
|
1695
|
+
"UpdateContents": [
|
1696
|
+
{
|
1697
|
+
"PR": 563,
|
1698
|
+
"Description": "fix #562"
|
1699
|
+
}
|
1700
|
+
],
|
1701
|
+
"Notes": "No release notes were provided for this release."
|
1691
1702
|
}
|
1692
1703
|
}
|
1693
1704
|
}
|
package/XMOJ.user.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
// ==UserScript==
|
2
2
|
// @name XMOJ
|
3
|
-
// @version 1.2.
|
3
|
+
// @version 1.2.3
|
4
4
|
// @description XMOJ增强脚本
|
5
5
|
// @author @XMOJ-Script-dev, @langningchen and the community
|
6
6
|
// @namespace https://github/langningchen
|
@@ -3895,6 +3895,7 @@ int main()
|
|
3895
3895
|
Discussion.classList.add("active");
|
3896
3896
|
if (location.pathname == "/discuss3/discuss.php") {
|
3897
3897
|
let ProblemID = parseInt(SearchParams.get("pid"));
|
3898
|
+
let BoardID = parseInt(SearchParams.get("bid"));
|
3898
3899
|
let Page = Number(SearchParams.get("page")) || 1;
|
3899
3900
|
document.querySelector("body > div > div").innerHTML = `<h3>讨论列表${(isNaN(ProblemID) ? "" : ` - 题目` + ProblemID)}</h3>
|
3900
3901
|
<button id="NewPost" type="button" class="btn btn-primary">发布新讨论</button>
|
@@ -3954,11 +3955,11 @@ int main()
|
|
3954
3955
|
if (ResponseData.Success == true) {
|
3955
3956
|
ErrorElement.style.display = "none";
|
3956
3957
|
if (!Silent) {
|
3957
|
-
DiscussPagination.children[0].children[0].href = "https://www.xmoj.tech/discuss3/discuss.php?" + (isNaN(ProblemID) ? "" : "pid=" + ProblemID + "&") + "page=1";
|
3958
|
-
DiscussPagination.children[1].children[0].href = "https://www.xmoj.tech/discuss3/discuss.php?" + (isNaN(ProblemID) ? "" : "pid=" + ProblemID + "&") + "page=" + (Page - 1);
|
3959
|
-
DiscussPagination.children[2].children[0].href = "https://www.xmoj.tech/discuss3/discuss.php?" + (isNaN(ProblemID) ? "" : "pid=" + ProblemID + "&") + "page=" + Page;
|
3960
|
-
DiscussPagination.children[3].children[0].href = "https://www.xmoj.tech/discuss3/discuss.php?" + (isNaN(ProblemID) ? "" : "pid=" + ProblemID + "&") + "page=" + (Page + 1);
|
3961
|
-
DiscussPagination.children[4].children[0].href = "https://www.xmoj.tech/discuss3/discuss.php?" + (isNaN(ProblemID) ? "" : "pid=" + ProblemID + "&") + "page=" + ResponseData.Data.PageCount;
|
3958
|
+
DiscussPagination.children[0].children[0].href = "https://www.xmoj.tech/discuss3/discuss.php?" + (isNaN(ProblemID) ? "" : "pid=" + ProblemID + "&") + (isNaN(BoardID) ? "" : "bid=" + BoardID + "&") + "page=1";
|
3959
|
+
DiscussPagination.children[1].children[0].href = "https://www.xmoj.tech/discuss3/discuss.php?" + (isNaN(ProblemID) ? "" : "pid=" + ProblemID + "&") + (isNaN(BoardID) ? "" : "bid=" + BoardID + "&") + "page=" + (Page - 1);
|
3960
|
+
DiscussPagination.children[2].children[0].href = "https://www.xmoj.tech/discuss3/discuss.php?" + (isNaN(ProblemID) ? "" : "pid=" + ProblemID + "&") + (isNaN(BoardID) ? "" : "bid=" + BoardID + "&") + "page=" + Page;
|
3961
|
+
DiscussPagination.children[3].children[0].href = "https://www.xmoj.tech/discuss3/discuss.php?" + (isNaN(ProblemID) ? "" : "pid=" + ProblemID + "&") + (isNaN(BoardID) ? "" : "bid=" + BoardID + "&") + "page=" + (Page + 1);
|
3962
|
+
DiscussPagination.children[4].children[0].href = "https://www.xmoj.tech/discuss3/discuss.php?" + (isNaN(ProblemID) ? "" : "pid=" + ProblemID + "&") + (isNaN(BoardID) ? "" : "bid=" + BoardID + "&") + "page=" + ResponseData.Data.PageCount;
|
3962
3963
|
if (Page <= 1) {
|
3963
3964
|
DiscussPagination.children[0].classList.add("disabled");
|
3964
3965
|
DiscussPagination.children[1].remove();
|