xmoj-script 1.2.7 → 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 CHANGED
@@ -5,14 +5,14 @@
5
5
  ![GitHub release](https://img.shields.io/github/v/release/XMOJ-Script-dev/XMOJ-Script)
6
6
  ![GitHub issues](https://img.shields.io/github/issues/XMOJ-Script-dev/XMOJ-Script)
7
7
 
8
- [点击此处访问官网查看更多内容](https://web.xmoj-bbs.tech)
8
+ [点击此处访问官网查看更多内容](https://xmoj-bbs.me)
9
9
 
10
10
  原项目: https://github.com/langningchen/XMOJ-Script
11
11
 
12
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>
13
13
 
14
14
  ### 帮助文档
15
- 地址:https://docs.xmoj-bbs.tech
15
+ 地址:https://docs.xmoj-bbs.me
16
16
  仓库:https://github.com/XMOJ-Script-dev/docs
17
17
 
18
18
  ### 介绍
@@ -59,7 +59,7 @@
59
59
 
60
60
  ![](Images/1.png)
61
61
  ![](Images/2.png)
62
- 更多图片可在[官网](https://www.xmoj-bbs.tech)上查看
62
+ 更多图片可在[官网](https://www.xmoj-bbs.me)上查看
63
63
 
64
64
  通过小明的OJ增强脚本,您将能够更便捷地参与竞赛,提高AC率,管理代码,优化学习体验,同时享受美化界面带来的愉悦感受。
65
65
  无论是竞技还是学习,这个脚本都将成为您在小明的OJ平台上的得力助手。
@@ -68,7 +68,7 @@
68
68
 
69
69
 
70
70
  ### 安装
71
- 请参考 [官网介绍](https://www.xmoj-bbs.tech) 。
71
+ 请参考 [官网介绍](https://www.xmoj-bbs.me) 。
72
72
  如果您无法打开该网站,请前往[这里](https://scriptcat.org/zh-CN/script-show-page/1500/)安装。
73
73
 
74
74
  ### 贡献
package/Update.json CHANGED
@@ -1759,6 +1759,28 @@
1759
1759
  }
1760
1760
  ],
1761
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."
1762
1784
  }
1763
1785
  }
1764
1786
  }
package/XMOJ.user.js CHANGED
@@ -1,6 +1,6 @@
1
1
  // ==UserScript==
2
2
  // @name XMOJ
3
- // @version 1.2.7
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
@@ -1168,8 +1168,14 @@ async function main() {
1168
1168
  </div>`;
1169
1169
  RequestAPI("GetNotice", {}, (Response) => {
1170
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"]);
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
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;
1173
1179
  }
1174
1180
  });
1175
1181
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xmoj-script",
3
- "version": "1.2.7",
3
+ "version": "1.2.9",
4
4
  "description": "an improvement script for xmoj.tech",
5
5
  "main": "AddonScript.js",
6
6
  "scripts": {