xmoj-script 1.1.59 → 1.1.61

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 CHANGED
@@ -1480,6 +1480,28 @@
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."
1494
+ },
1495
+ "1.1.61": {
1496
+ "UpdateDate": 1714207526058,
1497
+ "Prerelease": true,
1498
+ "UpdateContents": [
1499
+ {
1500
+ "PR": 517,
1501
+ "Description": "Auto Read Short message mentions"
1502
+ }
1503
+ ],
1504
+ "Notes": "No release notes were provided for this release."
1483
1505
  }
1484
1506
  }
1485
1507
  }
package/XMOJ.user.js CHANGED
@@ -1,6 +1,6 @@
1
1
  // ==UserScript==
2
2
  // @name XMOJ
3
- // @version 1.1.59
3
+ // @version 1.1.61
4
4
  // @description XMOJ增强脚本
5
5
  // @author @XMOJ-Script-dev, @langningchen and the community
6
6
  // @namespace https://github/langningchen
@@ -3790,6 +3790,9 @@ int main()
3790
3790
  }
3791
3791
  }
3792
3792
  }
3793
+ RequestAPI("ReadUserMailMention",{
3794
+ "UserID": String(SearchParams.get("to_user"))
3795
+ });
3793
3796
  RequestAPI("GetMail", {
3794
3797
  "OtherUser": String(SearchParams.get("to_user"))
3795
3798
  }, async (ResponseData) => {
@@ -3875,23 +3878,8 @@ int main()
3875
3878
  if (location.pathname == "/discuss3/discuss.php") {
3876
3879
  let ProblemID = parseInt(SearchParams.get("pid"));
3877
3880
  let Page = Number(SearchParams.get("page")) || 1;
3878
- document.querySelector("body > div > div").innerHTML = ` <div style="text-align:center"><h1>讨论列表${(isNaN(ProblemID) ? "" : ` - 题目` + ProblemID)}</h1></div>
3879
- <div class="row">
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>
3881
+ document.querySelector("body > div > div").innerHTML = `<h3>讨论列表${(isNaN(ProblemID) ? "" : ` - 题目` + ProblemID)}</h3>
3882
+ <button id="NewPost" type="button" class="btn btn-primary">发布新讨论</button>
3895
3883
  <nav>
3896
3884
  <ul class="pagination justify-content-center" id="DiscussPagination">
3897
3885
  <li class="page-item"><a class="page-link" href="#"><span>&laquo;</span></a></li>
@@ -3966,7 +3954,6 @@ int main()
3966
3954
  PostList.children[1].innerHTML = "";
3967
3955
  if (Posts.length == 0) {
3968
3956
  PostList.children[1].innerHTML = `<tr><td colspan="7">暂无数据</td></tr>`;
3969
- location.href = "https://www.xmoj.tech/discuss3/discuss.php";
3970
3957
  }
3971
3958
  for (let i = 0; i < Posts.length; i++) {
3972
3959
  let Row = document.createElement("tr");
@@ -4004,11 +3991,6 @@ int main()
4004
3991
  let LastReplyTimeCell = document.createElement("td");
4005
3992
  Row.appendChild(LastReplyTimeCell);
4006
3993
  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
3994
  }
4013
3995
  } else {
4014
3996
  ErrorElement.innerText = ResponseData.Message;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xmoj-script",
3
- "version": "1.1.59",
3
+ "version": "1.1.61",
4
4
  "description": "an improvement script for xmoj.tech",
5
5
  "main": "AddonScript.js",
6
6
  "scripts": {