xmoj-script 1.1.56 → 1.1.58

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.
@@ -1,20 +1 @@
1
- - [ ] 我已认真阅读贡献指南 (contributing guidelines) 和社区公约 (code of conduct),并遵循了如何参与页及格式手册页的相应规范。
2
-
3
- By making a contribution to this project, I certify that:
4
-
5
- The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or
6
-
7
- The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or
8
-
9
- The contribution was provided directly to me by some other person who certified 1., 2. or 3. and I have not modified it.
10
-
11
- I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved.
12
-
13
- <!--
14
- 这是 Pull Request 的描述页面,可拖动输入框右下角调节大小。尽管按下绿色按钮提交后,您仍可以对描述进行修改,但还请您先阅读以下注意事项。
15
- - 请不要删去本区域文字,或在此修改内容,因为本区域作为注释内容是不可见的。你应该点击 Preview 查看描述页效果。
16
- - 请勾选输入框外的 `Allow edits from maintainers` 的候选框(机器人需要修正格式),并通过蓝色高亮链接阅读、理解了指南和公约后,将上述 [ ] 替换为 [x]。
17
- - 若本 Pull Request 能够完全解决某个 Issue,请将该 Pull Request 与对应的 Issue 链接起来,具体做法请参见 <https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue>。
18
- - 请对照规范页面,检查 Commit 信息、PR 标题和下方 Compare 页面,例如:
19
- - 您的修改是否波及到了其他文件,是否发生了意图之外的文件名修改(这在您启用了翻译软件的情况下较为常见),是否引入了无关文件。
20
- -->
1
+ - [ ] 我已认真阅读贡献指南 (contributing guidelines) 和社区公约 (code of conduct),并遵循了如何参与页及格式手册页的相应规范。
@@ -0,0 +1,24 @@
1
+ name: Check PR CI
2
+
3
+ on:
4
+ schedule:
5
+ - cron: "*/10 * * * *"
6
+
7
+ jobs:
8
+ check-pr-ci:
9
+ runs-on: ubuntu-latest
10
+ steps:
11
+ - uses: actions-cool/check-pr-ci@v1
12
+ with:
13
+ token: ${{ secrets.GITHUB_TOKEN }}
14
+ # filter-label: 'check-ci'
15
+ # filter-creator-authority: 'write'
16
+ filter-head-ref: 'master, dev'
17
+ filter-support-fork: true
18
+ success-review: true
19
+ success-review-body: 'PR passes all checks'
20
+ success-merge: false
21
+ conflict-review-body: 'PR has conflicts, please fix them first!'
22
+ failure-review: 'REQUEST_CHANGES'
23
+ failure-review-body: 'PR fails some checks'
24
+ failure-close: false
@@ -0,0 +1,17 @@
1
+ name: Issues Similarity Analysis
2
+
3
+ on:
4
+ issues:
5
+ types: [opened, edited]
6
+
7
+ jobs:
8
+ similarity-analysis:
9
+ runs-on: ubuntu-latest
10
+ steps:
11
+ - name: analysis
12
+ uses: actions-cool/issues-similarity-analysis@v1
13
+ with:
14
+ filter-threshold: 0.75
15
+ title-excludes: 'bug, not, 1234'
16
+ comment-title: '### We have found some similar issues see'
17
+ comment-body: '${index}. ${similarity} #${number}'
package/SECURITY.md CHANGED
@@ -1,13 +1,5 @@
1
- # 安全策略
1
+ # Security Policy
2
2
 
3
- ## 当前支持的版本
3
+ ## Supported Versions
4
4
 
5
- | 版本 | 是否支持 | 预计结束支持时间 | 停止支持原因 |
6
- | ------- | ------------------ | --------- | -------- |
7
- | > 1.0.251 | :white_check_mark: | 支持 | |
8
- | 1.0.x (x < 251) | :x: | 已停止支持 | 后台 api 变动 |
9
- | 0.3.x | :x: | 已停止支持 | 开发组人员变动 |
10
- | 0.2.x | :x: | 已停止支持 | 讨论功能重大更新 |
11
- | 0.1.x | :x: | 已停止支持 | 重大安全隐患 + 依赖问题 (ansi_up) |
12
-
13
- 注意:在开发过程中,服务器和用户脚本可能在任何时候发生重大变动,造成非最新版本结束支持。在这种情况下,我们会尽快更新用户脚本!感谢您的谅解。
5
+ Only the latest stable release is supported
package/Update.json CHANGED
@@ -1439,6 +1439,36 @@
1439
1439
  }
1440
1440
  ],
1441
1441
  "Notes": "No release notes were provided for this release."
1442
+ },
1443
+ "1.1.57": {
1444
+ "UpdateDate": 1713526164395,
1445
+ "Prerelease": false,
1446
+ "UpdateContents": [
1447
+ {
1448
+ "PR": 497,
1449
+ "Description": "move the main msg content into a div with flex!!! :tada:"
1450
+ },
1451
+ {
1452
+ "PR": 499,
1453
+ "Description": "add markdown support to short messages "
1454
+ },
1455
+ {
1456
+ "PR": 505,
1457
+ "Description": "让 ctrl + enter 触发自动提交当年代码"
1458
+ }
1459
+ ],
1460
+ "Notes": "No release notes were provided for this release."
1461
+ },
1462
+ "1.1.58": {
1463
+ "UpdateDate": 1713668825681,
1464
+ "Prerelease": true,
1465
+ "UpdateContents": [
1466
+ {
1467
+ "PR": 514,
1468
+ "Description": "支持跳转到讨论编号 修改讨论区用户界面 在讨论区Page过大时自动跳转 在讨论区最后一页自动删除"
1469
+ }
1470
+ ],
1471
+ "Notes": "No release notes were provided for this release."
1442
1472
  }
1443
1473
  }
1444
1474
  }
package/XMOJ.user.js CHANGED
@@ -1,6 +1,6 @@
1
1
  // ==UserScript==
2
2
  // @name XMOJ
3
- // @version 1.1.56
3
+ // @version 1.1.58
4
4
  // @description XMOJ增强脚本
5
5
  // @author @XMOJ-Script-dev, @langningchen and the community
6
6
  // @namespace https://github/langningchen
@@ -3811,8 +3811,23 @@ int main()
3811
3811
  if (location.pathname == "/discuss3/discuss.php") {
3812
3812
  let ProblemID = parseInt(SearchParams.get("pid"));
3813
3813
  let Page = Number(SearchParams.get("page")) || 1;
3814
- document.querySelector("body > div > div").innerHTML = `<h3>讨论列表${(isNaN(ProblemID) ? "" : ` - 题目` + ProblemID)}</h3>
3815
- <button id="NewPost" type="button" class="btn btn-primary">发布新讨论</button>
3814
+ document.querySelector("body > div > div").innerHTML = ` <div style="text-align:center"><h1>讨论列表${(isNaN(ProblemID) ? "" : ` - 题目` + ProblemID)}</h1></div>
3815
+ <div class="row">
3816
+ <div class="col-md-5">
3817
+ <form action="discuss.php" >
3818
+ <div style="text-align:right">
3819
+ <button id="NewPost" type="button" class="btn btn-primary">发布新讨论</button>
3820
+ </div>
3821
+ </form>
3822
+ </div>
3823
+ <div class="col-md-3" style="display: inline">
3824
+ <form action="thread.php" class="input-group">
3825
+ <input class="form-control" type="number" name="tid" placeholder="讨论编号" min="1">
3826
+ <button class="btn btn-outline-secondary" type="submit">跳转</button>
3827
+ </form>
3828
+ </div style="display: inline">
3829
+ </div>
3830
+ <h><br></h>
3816
3831
  <nav>
3817
3832
  <ul class="pagination justify-content-center" id="DiscussPagination">
3818
3833
  <li class="page-item"><a class="page-link" href="#"><span>&laquo;</span></a></li>
@@ -3868,7 +3883,7 @@ int main()
3868
3883
  }, async (ResponseData) => {
3869
3884
  if (ResponseData.Success == true) {
3870
3885
  ErrorElement.style.display = "none";
3871
- if (!Silent) {
3886
+ if(!Silent) {
3872
3887
  DiscussPagination.children[0].children[0].href = "https://www.xmoj.tech/discuss3/discuss.php?" + (isNaN(ProblemID) ? "" : "pid=" + ProblemID + "&") + "page=1";
3873
3888
  DiscussPagination.children[1].children[0].href = "https://www.xmoj.tech/discuss3/discuss.php?" + (isNaN(ProblemID) ? "" : "pid=" + ProblemID + "&") + "page=" + (Page - 1);
3874
3889
  DiscussPagination.children[2].children[0].href = "https://www.xmoj.tech/discuss3/discuss.php?" + (isNaN(ProblemID) ? "" : "pid=" + ProblemID + "&") + "page=" + Page;
@@ -3887,6 +3902,7 @@ int main()
3887
3902
  PostList.children[1].innerHTML = "";
3888
3903
  if (Posts.length == 0) {
3889
3904
  PostList.children[1].innerHTML = `<tr><td colspan="7">暂无数据</td></tr>`;
3905
+ location.href = "https://www.xmoj.tech/discuss3/discuss.php";
3890
3906
  }
3891
3907
  for (let i = 0; i < Posts.length; i++) {
3892
3908
  let Row = document.createElement("tr");
@@ -3924,6 +3940,11 @@ int main()
3924
3940
  let LastReplyTimeCell = document.createElement("td");
3925
3941
  Row.appendChild(LastReplyTimeCell);
3926
3942
  LastReplyTimeCell.innerHTML = GetRelativeTime(Posts[i].LastReplyTime);
3943
+ if (Posts[i].PostID == 1) {
3944
+ DiscussPagination.children[DiscussPagination.children.length - 1].classList.add("disabled");
3945
+ DiscussPagination.children[DiscussPagination.children.length - 2].remove();
3946
+ break;
3947
+ }
3927
3948
  }
3928
3949
  } else {
3929
3950
  ErrorElement.innerText = ResponseData.Message;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xmoj-script",
3
- "version": "1.1.56",
3
+ "version": "1.1.58",
4
4
  "description": "an improvement script for xmoj.tech",
5
5
  "main": "AddonScript.js",
6
6
  "scripts": {
@@ -1,12 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <module type="WEB_MODULE" version="4">
3
- <component name="NewModuleRootManager">
4
- <content url="file://$MODULE_DIR$">
5
- <excludeFolder url="file://$MODULE_DIR$/.tmp" />
6
- <excludeFolder url="file://$MODULE_DIR$/temp" />
7
- <excludeFolder url="file://$MODULE_DIR$/tmp" />
8
- </content>
9
- <orderEntry type="inheritedJdk" />
10
- <orderEntry type="sourceFolder" forTests="false" />
11
- </component>
12
- </module>
package/.idea/modules.xml DELETED
@@ -1,8 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="ProjectModuleManager">
4
- <modules>
5
- <module fileurl="file://$PROJECT_DIR$/.idea/XMOJ-Script.iml" filepath="$PROJECT_DIR$/.idea/XMOJ-Script.iml" />
6
- </modules>
7
- </component>
8
- </project>
package/.idea/vcs.xml DELETED
@@ -1,7 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="VcsDirectoryMappings">
4
- <mapping directory="" vcs="Git" />
5
- <mapping directory="$PROJECT_DIR$/backend" vcs="Git" />
6
- </component>
7
- </project>
@@ -1,148 +0,0 @@
1
- {
2
- "github-actions.workflows.pinned.workflows": [],
3
- "cSpell.words": [
4
- "AAAAAAAI",
5
- "aliyuncs",
6
- "apos",
7
- "Arround",
8
- "chenlangning",
9
- "chensiru",
10
- "chentianle",
11
- "chenxuanhe",
12
- "chenzecong",
13
- "chenzerui",
14
- "colspan",
15
- "comparesource",
16
- "Consolas",
17
- "contestrank",
18
- "conteststatistics",
19
- "danwenxiao",
20
- "darcula",
21
- "dongminghui",
22
- "emsp",
23
- "freopen",
24
- "gaochenming",
25
- "gaolaoshi",
26
- "Geany",
27
- "guoqingtong",
28
- "guoruiqun",
29
- "guyuchen",
30
- "hanjialin",
31
- "hanshujian",
32
- "heshuhan",
33
- "hexinyi",
34
- "huangkai",
35
- "huangmingxuan",
36
- "huangruina",
37
- "huangwei",
38
- "huyiyang",
39
- "ignorews",
40
- "jiangxingyu",
41
- "jingtaiyu",
42
- "jinweizhe",
43
- "jresult",
44
- "laquo",
45
- "leijiahan",
46
- "leiwenda",
47
- "lianzhongzhe",
48
- "liaoyanxu",
49
- "lingzixiang",
50
- "linziyi",
51
- "liujianhao",
52
- "liujiankun",
53
- "liuxianyong",
54
- "liuxixian",
55
- "liyihan",
56
- "loginpage",
57
- "lostpassword",
58
- "luojinyang",
59
- "lutianfeng",
60
- "meitianyi",
61
- "modifypage",
62
- "newpost",
63
- "nowdate",
64
- "panyinliang",
65
- "pengyixuan",
66
- "PHPSESSID",
67
- "problemset",
68
- "problemstatus",
69
- "progressbar",
70
- "putong",
71
- "qianqingyuan",
72
- "qidekai",
73
- "raquo",
74
- "reinfo",
75
- "remoteip",
76
- "sampledata",
77
- "SAXKD",
78
- "shanwenxiao",
79
- "shenxichen",
80
- "shihongxi",
81
- "shimufan",
82
- "shiyichen",
83
- "shiyunhao",
84
- "showsource",
85
- "shuxinmo",
86
- "simform",
87
- "submitpage",
88
- "suiruochen",
89
- "sunyihan",
90
- "sunyimiao",
91
- "syntaxhighlighter",
92
- "tangchao",
93
- "tangyuhan",
94
- "tanhaoxuan",
95
- "taoxianyu",
96
- "USACO",
97
- "wangkangming",
98
- "wangminghao",
99
- "wangmingshuo",
100
- "wangpengyu",
101
- "wangsiyuan",
102
- "wangtianqi",
103
- "wangyuancheng",
104
- "wangzetong",
105
- "wanxinlian",
106
- "wensiyi",
107
- "wujinhong",
108
- "wurunze",
109
- "wuyukai",
110
- "xiangjicheng",
111
- "xiaoguanxun",
112
- "xiaojiasheng",
113
- "xiaruicheng",
114
- "xiaweimin",
115
- "xiaxuran",
116
- "xiebingxiu",
117
- "xieliren",
118
- "xinyihan",
119
- "xmlhttp",
120
- "XMOJ",
121
- "xuconghan",
122
- "xukan",
123
- "xuweiyi",
124
- "yanghaochen",
125
- "yezijiong",
126
- "youzhouhang",
127
- "yuanruiqing",
128
- "yutingjun",
129
- "zhangchenming",
130
- "zhangqiuze",
131
- "zhangshuxuan",
132
- "zhangwenda",
133
- "zhangyifu",
134
- "zhangyouheng",
135
- "zhaochenshen",
136
- "zhaochenwei",
137
- "zhengyinan",
138
- "zhonghongyi",
139
- "zhoujunyu",
140
- "zhouziyi",
141
- "zhouziyou",
142
- "zhuchenrui",
143
- "zhuruichen",
144
- "zhuxule",
145
- "zhuyikun",
146
- "zhuyiyang"
147
- ]
148
- }