xmoj-script 1.2.1 → 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 +22 -0
- package/XMOJ.user.js +12 -7
- package/package.json +1 -1
package/Update.json
CHANGED
@@ -1677,6 +1677,28 @@
|
|
1677
1677
|
}
|
1678
1678
|
],
|
1679
1679
|
"Notes": "No release notes were provided for this release."
|
1680
|
+
},
|
1681
|
+
"1.2.2": {
|
1682
|
+
"UpdateDate": 1721887214365,
|
1683
|
+
"Prerelease": true,
|
1684
|
+
"UpdateContents": [
|
1685
|
+
{
|
1686
|
+
"PR": 559,
|
1687
|
+
"Description": "Add CLion"
|
1688
|
+
}
|
1689
|
+
],
|
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."
|
1680
1702
|
}
|
1681
1703
|
}
|
1682
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
|
@@ -21,7 +21,7 @@
|
|
21
21
|
// @grant GM_setValue
|
22
22
|
// @grant GM_getValue
|
23
23
|
// @homepage https://www.xmoj-bbs.me/
|
24
|
-
// @supportURL https://
|
24
|
+
// @supportURL https://github.com/XMOJ-Script-dev/XMOJ-Script/issues
|
25
25
|
// @connect api.xmoj-bbs.tech
|
26
26
|
// @connect api.xmoj-bbs.me
|
27
27
|
// @connect challenges.cloudflare.com
|
@@ -3434,6 +3434,10 @@ int main()
|
|
3434
3434
|
"Name": "RedPanda C++",
|
3435
3435
|
"Image": "https://a.fsdn.com/allura/p/redpanda-cpp/icon",
|
3436
3436
|
"URL": "https://sourceforge.net/projects/redpanda-cpp/"
|
3437
|
+
}, {
|
3438
|
+
"Name": "CLion",
|
3439
|
+
"Image": "https://resources.jetbrains.com/storage/products/company/brand/logos/CLion_icon.png",
|
3440
|
+
"URL": "https://www.jetbrains.com/clion/download"
|
3437
3441
|
}, {
|
3438
3442
|
"Name": "CP Editor",
|
3439
3443
|
"Image": "https://a.fsdn.com/allura/mirror/cp-editor/icon",
|
@@ -3891,6 +3895,7 @@ int main()
|
|
3891
3895
|
Discussion.classList.add("active");
|
3892
3896
|
if (location.pathname == "/discuss3/discuss.php") {
|
3893
3897
|
let ProblemID = parseInt(SearchParams.get("pid"));
|
3898
|
+
let BoardID = parseInt(SearchParams.get("bid"));
|
3894
3899
|
let Page = Number(SearchParams.get("page")) || 1;
|
3895
3900
|
document.querySelector("body > div > div").innerHTML = `<h3>讨论列表${(isNaN(ProblemID) ? "" : ` - 题目` + ProblemID)}</h3>
|
3896
3901
|
<button id="NewPost" type="button" class="btn btn-primary">发布新讨论</button>
|
@@ -3950,11 +3955,11 @@ int main()
|
|
3950
3955
|
if (ResponseData.Success == true) {
|
3951
3956
|
ErrorElement.style.display = "none";
|
3952
3957
|
if (!Silent) {
|
3953
|
-
DiscussPagination.children[0].children[0].href = "https://www.xmoj.tech/discuss3/discuss.php?" + (isNaN(ProblemID) ? "" : "pid=" + ProblemID + "&") + "page=1";
|
3954
|
-
DiscussPagination.children[1].children[0].href = "https://www.xmoj.tech/discuss3/discuss.php?" + (isNaN(ProblemID) ? "" : "pid=" + ProblemID + "&") + "page=" + (Page - 1);
|
3955
|
-
DiscussPagination.children[2].children[0].href = "https://www.xmoj.tech/discuss3/discuss.php?" + (isNaN(ProblemID) ? "" : "pid=" + ProblemID + "&") + "page=" + Page;
|
3956
|
-
DiscussPagination.children[3].children[0].href = "https://www.xmoj.tech/discuss3/discuss.php?" + (isNaN(ProblemID) ? "" : "pid=" + ProblemID + "&") + "page=" + (Page + 1);
|
3957
|
-
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;
|
3958
3963
|
if (Page <= 1) {
|
3959
3964
|
DiscussPagination.children[0].classList.add("disabled");
|
3960
3965
|
DiscussPagination.children[1].remove();
|