xmoj-script 1.2.5 → 1.2.9
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/README.md +4 -29
- package/Update.json +60 -0
- package/XMOJ.user.js +17 -1
- package/package.json +1 -1
package/README.md
CHANGED
@@ -4,16 +4,15 @@
|
|
4
4
|

|
5
5
|

|
6
6
|

|
7
|
-
[](https://app.fossa.com/projects/git%2Bgithub.com%2FXMOJ-Script-dev%2FXMOJ-Script?ref=badge_shield)
|
8
7
|
|
9
|
-
[点击此处访问官网查看更多内容](https://
|
8
|
+
[点击此处访问官网查看更多内容](https://xmoj-bbs.me)
|
10
9
|
|
11
10
|
原项目: https://github.com/langningchen/XMOJ-Script
|
12
11
|
|
13
12
|
<a href="https://www.producthunt.com/posts/oj?utm_source=badge-featured&utm_medium=badge&utm_souce=badge-oj" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=458051&theme=light" alt="小明的OJ增强脚本 - 小明的OJ增强脚本 | Product Hunt" style="width: 250px; height: 54px;" width="250" height="54" /></a>
|
14
13
|
|
15
14
|
### 帮助文档
|
16
|
-
地址:https://docs.xmoj-bbs.
|
15
|
+
地址:https://docs.xmoj-bbs.me
|
17
16
|
仓库:https://github.com/XMOJ-Script-dev/docs
|
18
17
|
|
19
18
|
### 介绍
|
@@ -60,7 +59,7 @@
|
|
60
59
|
|
61
60
|

|
62
61
|

|
63
|
-
更多图片可在[官网](https://www.xmoj-bbs.
|
62
|
+
更多图片可在[官网](https://www.xmoj-bbs.me)上查看
|
64
63
|
|
65
64
|
通过小明的OJ增强脚本,您将能够更便捷地参与竞赛,提高AC率,管理代码,优化学习体验,同时享受美化界面带来的愉悦感受。
|
66
65
|
无论是竞技还是学习,这个脚本都将成为您在小明的OJ平台上的得力助手。
|
@@ -69,7 +68,7 @@
|
|
69
68
|
|
70
69
|
|
71
70
|
### 安装
|
72
|
-
请参考 [官网介绍](https://www.xmoj-bbs.
|
71
|
+
请参考 [官网介绍](https://www.xmoj-bbs.me) 。
|
73
72
|
如果您无法打开该网站,请前往[这里](https://scriptcat.org/zh-CN/script-show-page/1500/)安装。
|
74
73
|
|
75
74
|
### 贡献
|
@@ -85,27 +84,6 @@
|
|
85
84
|
> [!IMPORTANT]
|
86
85
|
> 请注意, 外部开发者应向`extern-contrib`提交 pull requests。
|
87
86
|
|
88
|
-
### Project Status
|
89
|
-
[](https://app.fossa.com/projects/git%2Bgithub.com%2FXMOJ-Script-dev%2FXMOJ-Script?ref=badge_shield&issueType=license)
|
90
|
-
|
91
|
-
### How to set up a development server
|
92
|
-
```bash
|
93
|
-
cd backend
|
94
|
-
npm install
|
95
|
-
npx wrangler d1 execute DB --file ./Source/Initial.sql --local
|
96
|
-
npx wrangler dev
|
97
|
-
```
|
98
|
-
## Contributors
|
99
|
-
|
100
|
-
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
|
101
|
-
<!-- prettier-ignore-start -->
|
102
|
-
<!-- markdownlint-disable -->
|
103
|
-
|
104
|
-
<!-- markdownlint-restore -->
|
105
|
-
<!-- prettier-ignore-end -->
|
106
|
-
|
107
|
-
<!-- ALL-CONTRIBUTORS-LIST:END -->
|
108
|
-
|
109
87
|
## Contributors
|
110
88
|
|
111
89
|
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
|
@@ -127,7 +105,4 @@ npx wrangler dev
|
|
127
105
|
<!-- ALL-CONTRIBUTORS-LIST:END -->
|
128
106
|
|
129
107
|
|
130
|
-
## License
|
131
|
-
[](https://app.fossa.com/projects/git%2Bgithub.com%2FXMOJ-Script-dev%2FXMOJ-Script?ref=badge_large)
|
132
|
-
|
133
108
|
|
package/Update.json
CHANGED
@@ -1721,6 +1721,66 @@
|
|
1721
1721
|
}
|
1722
1722
|
],
|
1723
1723
|
"Notes": "No release notes were provided for this release."
|
1724
|
+
},
|
1725
|
+
"1.2.6": {
|
1726
|
+
"UpdateDate": 1722048484899,
|
1727
|
+
"Prerelease": false,
|
1728
|
+
"UpdateContents": [
|
1729
|
+
{
|
1730
|
+
"PR": 557,
|
1731
|
+
"Description": "更改获取数据体验(增加报错)"
|
1732
|
+
},
|
1733
|
+
{
|
1734
|
+
"PR": 559,
|
1735
|
+
"Description": "Add CLion"
|
1736
|
+
},
|
1737
|
+
{
|
1738
|
+
"PR": 563,
|
1739
|
+
"Description": "fix #562"
|
1740
|
+
},
|
1741
|
+
{
|
1742
|
+
"PR": 565,
|
1743
|
+
"Description": "短消息增加图床支持"
|
1744
|
+
},
|
1745
|
+
{
|
1746
|
+
"PR": 566,
|
1747
|
+
"Description": "预览版域名切换"
|
1748
|
+
}
|
1749
|
+
],
|
1750
|
+
"Notes": "No release notes were provided for this release."
|
1751
|
+
},
|
1752
|
+
"1.2.7": {
|
1753
|
+
"UpdateDate": 1722063024309,
|
1754
|
+
"Prerelease": true,
|
1755
|
+
"UpdateContents": [
|
1756
|
+
{
|
1757
|
+
"PR": 570,
|
1758
|
+
"Description": "增加公告栏"
|
1759
|
+
}
|
1760
|
+
],
|
1761
|
+
"Notes": "No release notes were provided for this release."
|
1762
|
+
},
|
1763
|
+
"1.2.8": {
|
1764
|
+
"UpdateDate": 1722070813624,
|
1765
|
+
"Prerelease": false,
|
1766
|
+
"UpdateContents": [
|
1767
|
+
{
|
1768
|
+
"PR": 570,
|
1769
|
+
"Description": "增加公告栏"
|
1770
|
+
}
|
1771
|
+
],
|
1772
|
+
"Notes": "No release notes were provided for this release."
|
1773
|
+
},
|
1774
|
+
"1.2.9": {
|
1775
|
+
"UpdateDate": 1722088781344,
|
1776
|
+
"Prerelease": true,
|
1777
|
+
"UpdateContents": [
|
1778
|
+
{
|
1779
|
+
"PR": 573,
|
1780
|
+
"Description": "add username rendering for noticeboard"
|
1781
|
+
}
|
1782
|
+
],
|
1783
|
+
"Notes": "No release notes were provided for this release."
|
1724
1784
|
}
|
1725
1785
|
}
|
1726
1786
|
}
|
package/XMOJ.user.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
// ==UserScript==
|
2
2
|
// @name XMOJ
|
3
|
-
// @version 1.2.
|
3
|
+
// @version 1.2.9
|
4
4
|
// @description XMOJ增强脚本
|
5
5
|
// @author @XMOJ-Script-dev, @langningchen and the community
|
6
6
|
// @namespace https://github/langningchen
|
@@ -1162,6 +1162,22 @@ async function main() {
|
|
1162
1162
|
<div class="cnt-row-head title">倒计时</div>
|
1163
1163
|
<div class="cnt-row-body">${CountDownData}</div>
|
1164
1164
|
</div>`;
|
1165
|
+
document.querySelector("body > div > div.mt-3 > div > div.col-md-4").innerHTML += `<div class="cnt-row">
|
1166
|
+
<div class="cnt-row-head title">公告</div>
|
1167
|
+
<div class="cnt-row-body">加载中...</div>
|
1168
|
+
</div>`;
|
1169
|
+
RequestAPI("GetNotice", {}, (Response) => {
|
1170
|
+
if (Response.Success) {
|
1171
|
+
document.querySelector("body > div.container > div > div > div.col-md-4 > div:nth-child(2) > div.cnt-row-body").innerHTML = marked.parse(Response.Data["Notice"]).replaceAll(/@([a-zA-Z0-9]+)/g, `<b>@</b><span class="ms-1 Usernames">$1</span>`);
|
1172
|
+
RenderMathJax();
|
1173
|
+
let UsernameElements = document.getElementsByClassName("Usernames");
|
1174
|
+
for (let i = 0; i < UsernameElements.length; i++) {
|
1175
|
+
GetUsernameHTML(UsernameElements[i], UsernameElements[i].innerText, true);
|
1176
|
+
}
|
1177
|
+
} else {
|
1178
|
+
document.querySelector("body > div.container > div > div > div.col-md-4 > div:nth-child(2) > div.cnt-row-body").innerHTML = "加载失败: " + Response.Message;
|
1179
|
+
}
|
1180
|
+
});
|
1165
1181
|
}
|
1166
1182
|
} else if (location.pathname == "/problemset.php") {
|
1167
1183
|
if (UtilityEnabled("Translate")) {
|