Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
0303ba7
fix: 所有 querySelector 调用前增加 null 检查 (#1009)
claude Sep 27, 2026
7238000
3.7.1
github-actions[bot] Sep 27, 2026
0495b7f
Update version info to 3.7.1
github-actions[bot] Sep 27, 2026
5fe4f10
fix: 页面结构异常时跳过对应页面的处理,并避免用空值发起请求
claude Sep 27, 2026
e14de3d
Update time and description of 3.7.1
github-actions[bot] Sep 27, 2026
d67e932
fix: 用户信息页面异常时返回默认值,未解析到AC题目时不启用刷AC率
claude Sep 27, 2026
dd73dab
Merge branch 'claude/issue-1009-u2n0g5' of https://github.com/XMOJ-Sc…
claude Sep 27, 2026
e15e57b
Update time and description of 3.7.1
github-actions[bot] Sep 27, 2026
ad8e08d
feat: 兼容新版 /web/contest/ 比赛页面 (#1029)
claude Sep 27, 2026
32127d1
Update time and description of 3.7.1
github-actions[bot] Sep 27, 2026
952541e
fix: 新版比赛页面使用与旧版页面一致的界面和导航栏行为 (#1029)
claude Sep 27, 2026
480cde2
Merge branch 'claude/issue-1009-u2n0g5' of https://github.com/XMOJ-Sc…
claude Sep 27, 2026
3ff0207
Update time and description of 3.7.1
github-actions[bot] Sep 27, 2026
12491a3
test: 添加在真实站点上运行脚本的 Playwright 测试工具
claude Sep 27, 2026
484940c
Merge branch 'claude/issue-1009-u2n0g5' of https://github.com/XMOJ-Sc…
claude Sep 27, 2026
3a2b84c
Update time and description of 3.7.1
github-actions[bot] Sep 27, 2026
c6db13c
test: 测试工具只拦截脚本后端,不再把自己拦截的请求报告为错误
claude Sep 27, 2026
a6b53ce
Merge branch 'claude/issue-1009-u2n0g5' of https://github.com/XMOJ-Sc…
claude Sep 27, 2026
d27ee8b
Update time and description of 3.7.1
github-actions[bot] Sep 27, 2026
5f6efea
fix: 新版比赛页面恢复旧版左侧题目切换器 (#1029)
claude Sep 27, 2026
ff9635f
Merge branch 'claude/issue-1009-u2n0g5' of https://github.com/XMOJ-Sc…
claude Sep 27, 2026
7b7e22c
Update time and description of 3.7.1
github-actions[bot] Sep 27, 2026
190786e
refactor: 旧版比赛页面重定向到新版 /web 页面,并移除其处理代码 (#1029)
claude Sep 27, 2026
57a4b22
Merge branch 'claude/issue-1009-u2n0g5' of https://github.com/XMOJ-Sc…
claude Sep 27, 2026
088e455
Update time and description of 3.7.1
github-actions[bot] Sep 27, 2026
8b15546
test: 测试工具等待 <html> 时改用任务执行脚本,避免重定向导致 Chromium 渲染进程崩溃
claude Sep 27, 2026
a91afb5
Merge branch 'claude/issue-1009-u2n0g5' of https://github.com/XMOJ-Sc…
claude Sep 27, 2026
51c04a6
Update time and description of 3.7.1
github-actions[bot] Sep 27, 2026
1ed0f0b
refactor: 题目切换器改用接口数据,移除刷新按钮 (#1029)
claude Sep 27, 2026
c93e64c
Merge branch 'claude/issue-1009-u2n0g5' of https://github.com/XMOJ-Sc…
claude Sep 27, 2026
e47fb64
Update time and description of 3.7.1
github-actions[bot] Sep 27, 2026
bd9aa17
test: 测试工具页面加载超时延长到一分钟并重试一次
claude Sep 27, 2026
b2922dd
Merge branch 'claude/issue-1009-u2n0g5' of https://github.com/XMOJ-Sc…
claude Sep 27, 2026
9163d10
Update time and description of 3.7.1
github-actions[bot] Sep 27, 2026
d0df16d
fix: 减少页面加载时的闪烁和布局偏移 (#1029)
claude Sep 27, 2026
5db5e5b
Merge branch 'claude/issue-1009-u2n0g5' of https://github.com/XMOJ-Sc…
claude Sep 27, 2026
a778123
Update time and description of 3.7.1
github-actions[bot] Sep 27, 2026
6ba7ba3
fix: 页面显示的保底时间改为从 main() 开始计算,避免登录检查较慢时提前显示未转换的导航栏
claude Sep 27, 2026
22319a2
Merge branch 'claude/issue-1009-u2n0g5' of https://github.com/XMOJ-Sc…
claude Sep 27, 2026
51d0308
Update time and description of 3.7.1
github-actions[bot] Sep 27, 2026
7984d2c
fix: 黑白主题下表头中的链接与表头背景同色、无法阅读
claude Sep 27, 2026
7f1235c
Merge branch 'claude/issue-1009-u2n0g5' of https://github.com/XMOJ-Sc…
claude Sep 27, 2026
f203e65
Update time and description of 3.7.1
github-actions[bot] Sep 27, 2026
8e5114c
fix: 多 subtask 测试点页面不再报错;单元测试接入 npm test 和 CI (#1009)
claude Sep 27, 2026
2d23e9f
Merge branch 'claude/issue-1009-u2n0g5' of https://github.com/XMOJ-Sc…
claude Sep 27, 2026
95d9f2d
Update time and description of 3.7.1
github-actions[bot] Sep 27, 2026
99af565
fix: 首页公告的 Markdown 渲染结果经过 PurifyHTML 过滤后再插入页面
claude Sep 27, 2026
738fee4
Merge branch 'claude/issue-1009-u2n0g5' of https://github.com/XMOJ-Sc…
claude Sep 27, 2026
7bafbbd
Update time and description of 3.7.1
github-actions[bot] Sep 27, 2026
a34a4dd
Update time and description of 3.7.1
github-actions[bot] Sep 27, 2026
11f1068
revert: 首页公告不经过 PurifyHTML(维持原有行为)
claude Sep 27, 2026
26fc273
Update time and description of 3.7.1
github-actions[bot] Sep 27, 2026
16eef87
Update time and description of 3.7.1
github-actions[bot] Sep 27, 2026
d71a91d
Update time and description of 3.7.1
github-actions[bot] Sep 27, 2026
a87f10b
Fix missing scores on status.php
claude Sep 27, 2026
acb3843
Merge branch 'claude/issue-1009-u2n0g5' of https://github.com/XMOJ-Sc…
claude Sep 27, 2026
b26c8a1
Update time and description of 3.7.1
github-actions[bot] Sep 27, 2026
3a74844
Match the legacy problem page on /web and stop the top bar from shrin…
claude Sep 27, 2026
0800270
Merge branch 'claude/issue-1009-u2n0g5' of https://github.com/XMOJ-Sc…
claude Sep 27, 2026
9840c3b
Update time and description of 3.7.1
github-actions[bot] Sep 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/Test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Test
on:
pull_request:
push:
branches:
- dev
- master
jobs:
Test:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v4
with:
node-version: 22
- run: npm test
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
.idea
.vscode
.DS_Store
tests/harness-output/
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
地址:https://docs.xmoj-bbs.me
仓库:https://github.com/XMOJ-Script-dev/docs

### 新版比赛页面兼容性

支持新版 `/web/contest/` 比赛列表、题目列表、题面、订正排名、标程和题解页面。脚本保留新版应用的导航、语言切换和排序,并使用与旧版页面相同的 Bootstrap 5 界面与导航栏行为(新版顶部导航栏、用户菜单、翻译等),在页面异步加载及站内切换后应用界面主题、倒计时、复制、讨论入口、批量打开题目和代码阅读器等增强功能。比赛题号及文件输入输出信息通过新版 API 同步,提交页面不再依赖旧版比赛 HTML。相关问题:[#1029](https://github.com/XMOJ-Script-dev/XMOJ-Script/issues/1029)。

### 介绍

`xmoj-script` 是一个功能强大的浏览器扩展,旨在提升用户在小明的OJ(某虚拟在线竞赛平台)上的使用体验。
Expand Down
11 changes: 11 additions & 0 deletions Update.json
Original file line number Diff line number Diff line change
Expand Up @@ -3780,6 +3780,17 @@
}
],
"Notes": "<h3>3.7.0 — 自上一正式版 3.6.0 以来的完整更新</h3>\n<p>本次正式版整合 3.6.1、3.6.2、3.6.3、3.6.4、3.6.5 和 3.6.6 的全部功能更新与修复。</p>\n<h4>3.6.1:代码对比显示修复(#1006,修复 #1004)</h4>\n<ul><li>修复 Monaco 代码对比区域的高度布局,为合并编辑器容器设置高度,恢复对比内容的正常显示。</li></ul>\n<h4>3.6.2:提交记录布局修复(#1013)</h4>\n<ul><li>修复题目 ID 为 0、缺少重新提交链接时提交记录的排版错误,避免相关处理打断页面。</li><li>安全构造提交记录中的链接,并将缺失链接的判断限定在需要重新提交链接的处理逻辑中。</li></ul>\n<h4>3.6.3:获取数据功能升级(#1015)</h4>\n<ul>\n<li>页面没有数据申请区域时自动创建获取数据控件。</li>\n<li>默认模式采用 gzip + Base93 压缩传输,逐字节保留任意输入,支持文本、Unicode 和混合内容;无效 UTF-8 以可逆的逐字节转义形式显示。</li>\n<li>新增可选 NSC3 高速数值模式,压缩 long long 整数及每行数值个数;规范数值输入可恢复空格、空行、换行与末尾换行,非规范或混合内容原样回退。</li>\n<li>新增“保留换行”选项,默认开启。关闭后,规范数值输入恢复为单行空格分隔数据,降低随机行长带来的输出开销;仅适用于 cin 或 scanf 等不依赖行边界的读取方式,不适用于 getline 或按行解析。</li>\n<li>界面增加各模式的说明与适用范围,帮助选择通用模式或高速数值模式。</li>\n<li>生成的数据获取程序先向 stderr 输出并刷新,再通过 abort() 触发运行错误以返回数据;同时兼容读取旧版异常包装结果。</li>\n</ul>\n<h4>3.6.4:提交验证码支持(#1019)</h4>\n<ul>\n<li>修复评测队列繁忙、服务端启用验证码时,脚本提交界面丢失验证码字段而导致提交失败的问题。</li>\n<li>显示验证码图片与输入框,支持点击图片更换、按回车提交,并在提交请求中携带验证码。</li>\n<li>新增 AutoCaptcha 设置,支持在浏览器本地通过模板匹配识别四位数字验证码,不调用外部 AI 服务。识别不确定时交由用户输入;非四位数字类型提示手动填写。</li>\n<li>普通提交与强制提交均检查验证码是否为空,并在实际发送请求前再次检查,避免用户中途清空或刷新图片后仍发送空验证码。</li>\n<li>若服务端在页面加载后才要求验证码,或返回验证码错误,显示并刷新验证码、恢复提交按钮并提示重新填写。</li>\n</ul>\n<h4>3.6.5:比赛结束后回退提交修复(#1021)</h4>\n<ul>\n<li>修复比赛结束后向原题回退提交时响应被忽略、提交静默丢失的问题。</li>\n<li>从比赛题目列表中解析完整原题编号,避免固定截取四位数字造成题号错误。</li>\n<li>正确处理成功跳转、提交冷却与服务端错误;遇到重复提交限制时按三秒间隔重试,最多尝试五次,并显示进度及失败原因。</li>\n<li>每次回退请求前重新检查验证码并携带当前输入;验证码失效时刷新图片并要求重新填写。</li>\n<li>处理比赛页面读取、题目列表解析及提交网络错误,恢复按钮状态,避免一直停留在“正在提交”。</li>\n</ul>\n<h4>3.6.6:验证码自动更换与重试(#1023)</h4>\n<ul>\n<li>启用自动识别后,若当前验证码识别不确定,自动更换图片重试,最多尝试五张;仍不确定时提示手动输入或点击换图。</li>\n<li>换图请求期间暂时锁定输入框,避免用户根据旧图片填写;图片加载完成或请求失败后恢复输入。</li>\n<li>防止过期异步请求覆盖较新的验证码状态,并避免自动识别覆盖用户已经输入的内容。</li>\n<li>验证码图片加载失败时给出明确提示,支持点击图片重试。</li>\n</ul>"
},
"3.7.1": {
"UpdateDate": 1790519078910,
"Prerelease": true,
"UpdateContents": [
{
"PR": 1028,
"Description": "fix: 修复异常页面的 TypeError,并兼容新版 /web/contest 比赛页面"
}
],
"Notes": "No release notes were provided for this release."
}
}
}
Loading
Loading