xmoj-script 1.1.59 → 1.1.60
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 +3 -24
- package/package.json +1 -1
package/Update.json
CHANGED
@@ -1480,6 +1480,17 @@
|
|
1480
1480
|
}
|
1481
1481
|
],
|
1482
1482
|
"Notes": "No release notes were provided for this release."
|
1483
|
+
},
|
1484
|
+
"1.1.60": {
|
1485
|
+
"UpdateDate": 1713682768316,
|
1486
|
+
"Prerelease": true,
|
1487
|
+
"UpdateContents": [
|
1488
|
+
{
|
1489
|
+
"PR": 516,
|
1490
|
+
"Description": "revert #514"
|
1491
|
+
}
|
1492
|
+
],
|
1493
|
+
"Notes": "No release notes were provided for this release."
|
1483
1494
|
}
|
1484
1495
|
}
|
1485
1496
|
}
|
package/XMOJ.user.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
// ==UserScript==
|
2
2
|
// @name XMOJ
|
3
|
-
// @version 1.1.
|
3
|
+
// @version 1.1.60
|
4
4
|
// @description XMOJ增强脚本
|
5
5
|
// @author @XMOJ-Script-dev, @langningchen and the community
|
6
6
|
// @namespace https://github/langningchen
|
@@ -3875,23 +3875,8 @@ int main()
|
|
3875
3875
|
if (location.pathname == "/discuss3/discuss.php") {
|
3876
3876
|
let ProblemID = parseInt(SearchParams.get("pid"));
|
3877
3877
|
let Page = Number(SearchParams.get("page")) || 1;
|
3878
|
-
document.querySelector("body > div > div").innerHTML =
|
3879
|
-
|
3880
|
-
<div class="col-md-5">
|
3881
|
-
<form action="discuss.php" >
|
3882
|
-
<div style="text-align:right">
|
3883
|
-
<button id="NewPost" type="button" class="btn btn-primary">发布新讨论</button>
|
3884
|
-
</div>
|
3885
|
-
</form>
|
3886
|
-
</div>
|
3887
|
-
<div class="col-md-3" style="display: inline">
|
3888
|
-
<form action="thread.php" class="input-group">
|
3889
|
-
<input class="form-control" type="number" name="tid" placeholder="讨论编号" min="1">
|
3890
|
-
<button class="btn btn-outline-secondary" type="submit">跳转</button>
|
3891
|
-
</form>
|
3892
|
-
</div style="display: inline">
|
3893
|
-
</div>
|
3894
|
-
<h><br></h>
|
3878
|
+
document.querySelector("body > div > div").innerHTML = `<h3>讨论列表${(isNaN(ProblemID) ? "" : ` - 题目` + ProblemID)}</h3>
|
3879
|
+
<button id="NewPost" type="button" class="btn btn-primary">发布新讨论</button>
|
3895
3880
|
<nav>
|
3896
3881
|
<ul class="pagination justify-content-center" id="DiscussPagination">
|
3897
3882
|
<li class="page-item"><a class="page-link" href="#"><span>«</span></a></li>
|
@@ -3966,7 +3951,6 @@ int main()
|
|
3966
3951
|
PostList.children[1].innerHTML = "";
|
3967
3952
|
if (Posts.length == 0) {
|
3968
3953
|
PostList.children[1].innerHTML = `<tr><td colspan="7">暂无数据</td></tr>`;
|
3969
|
-
location.href = "https://www.xmoj.tech/discuss3/discuss.php";
|
3970
3954
|
}
|
3971
3955
|
for (let i = 0; i < Posts.length; i++) {
|
3972
3956
|
let Row = document.createElement("tr");
|
@@ -4004,11 +3988,6 @@ int main()
|
|
4004
3988
|
let LastReplyTimeCell = document.createElement("td");
|
4005
3989
|
Row.appendChild(LastReplyTimeCell);
|
4006
3990
|
LastReplyTimeCell.innerHTML = GetRelativeTime(Posts[i].LastReplyTime);
|
4007
|
-
if (Posts[i].PostID == 1) {
|
4008
|
-
DiscussPagination.children[DiscussPagination.children.length - 1].classList.add("disabled");
|
4009
|
-
DiscussPagination.children[DiscussPagination.children.length - 2].remove();
|
4010
|
-
break;
|
4011
|
-
}
|
4012
3991
|
}
|
4013
3992
|
} else {
|
4014
3993
|
ErrorElement.innerText = ResponseData.Message;
|