Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
237 commits
Select commit Hold shift + click to select a range
9f5c208
refactor: simplify SubmitLink selection by querying all anchors and f…
boomzero Oct 7, 2025
10d6806
fix: problem PID 可能为 null (#877)
boomzero Oct 7, 2025
8b9f36b
Bump actions/checkout from 5 to 6 (#883)
dependabot[bot] Nov 24, 2025
9eeec96
Initial plan
Copilot Feb 6, 2026
6bca552
Fix AC code export to support 5-digit question IDs
Copilot Feb 6, 2026
9f2ddc9
2.5.3
github-actions[bot] Feb 6, 2026
01c214f
Update version info to 2.5.3
github-actions[bot] Feb 6, 2026
5c12498
Add validation for malformed data in AC code export
Copilot Feb 6, 2026
660b4e1
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
ba34c78
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
b7262ca
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
997d6d7
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
e4d34f5
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
deba7b5
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
6719c31
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
33c3f52
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
b909f21
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
11b9aab
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
ac74448
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
5be26bb
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
51b7c03
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
d24a254
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
2d152de
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
64d44bf
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
ec8098c
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
e4c8ef3
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
f8076f9
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
d8e3405
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
4e5e8ae
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
d865b11
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
979c25e
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
291747b
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
3d523e3
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
3db21eb
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
841f7b0
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
2b77c1e
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
12f0488
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
061cf6b
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
42f1f42
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
a74ae36
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
2fcac56
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
b135d6b
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
ef42441
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
bbea4fd
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
bb134f1
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
d34cd0f
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
c5481e9
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
ed52104
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
fa6970e
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
b24d441
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
0722f1a
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
33b86fe
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
95d7b71
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
0e98cbc
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
df78400
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
301bba6
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
f71ac22
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
5c14073
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
4afe5df
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
970ea60
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
2314cb9
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
b0f2fb5
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
8e5169c
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
79e48da
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
9a0d8ac
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
03f81f6
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
217401b
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
6031225
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
19a6da2
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
917c30d
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
5833710
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
6ad898a
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
d41c546
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
f615da5
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
4c9a9b5
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
8f30ba0
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
af546bb
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
10c8b37
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
1335aca
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
e87be79
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
70a8acb
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
d5eb357
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
43de6db
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
3990ff5
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
5f42fa5
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
696376a
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
6014824
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
98bbc1d
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
39827a8
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
da56928
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
8521ecd
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
c4d6499
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
769b47c
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
ff2a88b
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
3f2c95b
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
26283f5
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
235bc6b
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
c04adbc
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
f6848a2
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
5bbc98b
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
c0e6b9d
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
458adff
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
a9e3abc
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
5868391
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
bcb6799
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
c9351ab
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
2c9996c
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
ba55ded
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
2f08172
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
849ca60
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
e0c295f
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
e50e945
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
811af5e
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
7ebb4bc
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
7de6fc7
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
17cfe98
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
dda4af4
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
54bfcaf
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
3604082
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
83fbba0
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
74e23b8
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
d35ab46
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
fb8e701
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
aa2439f
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
acf021e
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
85128d8
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
b0ea8a4
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
ab40501
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
35b70fc
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
ac02892
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
bb16721
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
f42d46d
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
4d72bd3
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
e3108ba
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
a77378f
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
6272209
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
d968373
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
1d83d76
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
eebe9d4
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
0f60674
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
d31312d
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
c0d3232
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
296ebcf
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
334c8ba
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
e19b3ab
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
ca64ae6
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
6583a14
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
01f56da
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
267cd45
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
b9ebb65
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
5519364
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
e3e1d8f
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
4be6ba7
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
3fcec52
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
58eb5cd
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
e45090f
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
94f05b5
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
eb6006c
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
fe9a342
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
698726c
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
ad5204e
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
587297e
Update time and description of 2.5.3
github-actions[bot] Feb 6, 2026
83609ec
Fix infinite recursion in UpdateVersion workflow
Copilot Feb 6, 2026
8fd8a9c
Merge pull request #888 from XMOJ-Script-dev/copilot/fix-ac-code-expo…
PythonSmall-Q Feb 6, 2026
d4b577a
Disable npm publish and checkout steps
PythonSmall-Q Feb 7, 2026
0d01bd8
Uncomment checkout action in Prerelease workflow
PythonSmall-Q Feb 7, 2026
c1d7885
2.6.0
github-actions[bot] Feb 7, 2026
8a29ef2
Update to release 2.6.0
github-actions[bot] Feb 7, 2026
ca77197
2.6.1
github-actions[bot] Feb 7, 2026
57df3bc
Update version info to 2.6.1
github-actions[bot] Feb 7, 2026
2a5d2f0
Update time and description of 2.6.1
github-actions[bot] Feb 7, 2026
7ea068f
Update time and description of 2.6.1
github-actions[bot] Feb 7, 2026
ade39a9
Update time and description of 2.6.1
github-actions[bot] Feb 7, 2026
cd4906a
Update time and description of 2.6.1
github-actions[bot] Feb 7, 2026
b451102
Update time and description of 2.6.1
github-actions[bot] Feb 7, 2026
a2af9fe
Update time and description of 2.6.1
github-actions[bot] Feb 7, 2026
414642c
Update time and description of 2.6.1
github-actions[bot] Feb 7, 2026
9a5b5de
Update time and description of 2.6.1
github-actions[bot] Feb 7, 2026
92f7077
Update time and description of 2.6.1
github-actions[bot] Feb 7, 2026
9bf1a99
Merge pull request #892 from XMOJ-Script-dev/actions/temp
PythonSmall-Q Feb 7, 2026
817c130
Update XMOJ.user.js
PythonSmall-Q Feb 7, 2026
4cdc54d
Modify UpdateToRelease workflow for bot triggers
PythonSmall-Q Feb 7, 2026
1dab5ca
2.7.0
github-actions[bot] Feb 7, 2026
d2e3f75
Update to release 2.7.0
github-actions[bot] Feb 7, 2026
7e6bf2b
2.7.1
github-actions[bot] Feb 7, 2026
4004cc4
Update version info to 2.7.1
github-actions[bot] Feb 7, 2026
f4f26e6
2.7.2
github-actions[bot] Feb 7, 2026
dd3cce0
Update version info to 2.7.2
github-actions[bot] Feb 7, 2026
946553f
Update time and description of 2.7.2
github-actions[bot] Feb 7, 2026
a5f2acd
Update time and description of 2.7.2
github-actions[bot] Feb 7, 2026
973aaea
Update time and description of 2.7.2
github-actions[bot] Feb 7, 2026
d383af3
Update time and description of 2.7.2
github-actions[bot] Feb 7, 2026
4183265
Update time and description of 2.7.2
github-actions[bot] Feb 7, 2026
e42dce2
Update time and description of 2.7.2
github-actions[bot] Feb 7, 2026
6d05983
Update time and description of 2.7.2
github-actions[bot] Feb 7, 2026
d66370d
Update time and description of 2.7.2
github-actions[bot] Feb 7, 2026
fa78980
Update time and description of 2.7.2
github-actions[bot] Feb 7, 2026
114fbd1
Update time and description of 2.7.2
github-actions[bot] Feb 7, 2026
d6ba986
Update time and description of 2.7.2
github-actions[bot] Feb 7, 2026
d6ac92b
Update time and description of 2.7.2
github-actions[bot] Feb 7, 2026
847343a
Update time and description of 2.7.2
github-actions[bot] Feb 7, 2026
2b94ef2
Update time and description of 2.7.2
github-actions[bot] Feb 7, 2026
7a3a0b9
Update time and description of 2.7.2
github-actions[bot] Feb 7, 2026
f50ae30
Update time and description of 2.7.2
github-actions[bot] Feb 7, 2026
d3fd5d6
Update time and description of 2.7.2
github-actions[bot] Feb 7, 2026
4e61ec4
Update time and description of 2.7.2
github-actions[bot] Feb 7, 2026
a0376cb
Update time and description of 2.7.2
github-actions[bot] Feb 7, 2026
b64bcba
Update time and description of 2.7.2
github-actions[bot] Feb 7, 2026
fb1037a
Update time and description of 2.7.2
github-actions[bot] Feb 7, 2026
c13fda1
Update time and description of 2.7.2
github-actions[bot] Feb 7, 2026
acd5686
Update time and description of 2.7.2
github-actions[bot] Feb 7, 2026
7909fea
Update time and description of 2.7.2
github-actions[bot] Feb 7, 2026
ea460a3
Update time and description of 2.7.2
github-actions[bot] Feb 7, 2026
c003572
Update time and description of 2.7.2
github-actions[bot] Feb 7, 2026
48319db
Update time and description of 2.7.2
github-actions[bot] Feb 7, 2026
b7c8eda
Update time and description of 2.7.2
github-actions[bot] Feb 7, 2026
25247b8
Update time and description of 2.7.2
github-actions[bot] Feb 7, 2026
694e55c
Update time and description of 2.7.2
github-actions[bot] Feb 7, 2026
6bb6ab8
Update time and description of 2.7.2
github-actions[bot] Feb 7, 2026
a18af60
Update time and description of 2.7.2
github-actions[bot] Feb 7, 2026
12cc69d
Update time and description of 2.7.2
github-actions[bot] Feb 7, 2026
7dd3786
Update time and description of 2.7.2
github-actions[bot] Feb 7, 2026
cc59f73
Update time and description of 2.7.2
github-actions[bot] Feb 7, 2026
4506bca
Update time and description of 2.7.2
github-actions[bot] Feb 7, 2026
bcc062a
Update time and description of 2.7.2
github-actions[bot] Feb 7, 2026
f0df264
Update time and description of 2.7.2
github-actions[bot] Feb 7, 2026
b621ef8
Update time and description of 2.7.2
github-actions[bot] Feb 7, 2026
8ead8ad
Update time and description of 2.7.2
github-actions[bot] Feb 7, 2026
81f4b72
Update time and description of 2.7.2
github-actions[bot] Feb 7, 2026
5bbee39
Update time and description of 2.7.2
github-actions[bot] Feb 7, 2026
852c3cd
Update time and description of 2.7.2
github-actions[bot] Feb 7, 2026
a84afef
Update time and description of 2.7.2
github-actions[bot] Feb 7, 2026
62a39b1
Update time and description of 2.7.2
github-actions[bot] Feb 7, 2026
85ebfbe
Update time and description of 2.7.2
github-actions[bot] Feb 7, 2026
b3de29a
Update time and description of 2.7.2
github-actions[bot] Feb 7, 2026
8abf9ea
Update time and description of 2.7.2
github-actions[bot] Feb 7, 2026
8e01ee2
Merge pull request #896 from XMOJ-Script-dev/actions/temp
boomzero Feb 7, 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
2 changes: 1 addition & 1 deletion .github/workflows/AutoLabelIssue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Generate a token
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/CodeQL.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: github/codeql-action/init@v3
with:
languages: "javascript"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/DependencyScan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: actions/dependency-review-action@v4
10 changes: 5 additions & 5 deletions .github/workflows/Prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ jobs:
with:
node-version: 16
registry-url: https://registry.npmjs.org/
- uses: actions/checkout@v5
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Publish to npm
run: npm publish --provenance
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
# - name: Publish to npm
# run: npm publish --provenance
# env:
# NODE_AUTH_TOKEN: ${{secrets.npm_token}}
- name: Get version
env:
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/Release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
with:
node-version: 16
registry-url: https://registry.npmjs.org/
- uses: actions/checkout@v5
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Get version
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/UpdateToRelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ on:
jobs:
UpdateToRelease:
runs-on: ubuntu-latest
# 添加条件:如果是 bot 触发的则跳过,避免无限循环
if: github.event.pull_request.user.login != 'github-actions[bot]'
permissions:
pull-requests: write
contents: write
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Update to release
Expand All @@ -25,7 +27,7 @@ jobs:
gh pr comment ${{ github.event.pull_request.number }} --body "请向\`dev\`分支提交pull request, 本pull request将被自动关闭"
gh pr close ${{ github.event.pull_request.number }}
else
node ./Update/UpdateToRelease.js ${{ secrets.GITHUB_TOKEN }} ${{ github.event.number }} "$PR_BODY"
node ./Update/UpdateToRelease.js ${{ secrets.GITHUB_TOKEN }} ${{ github.event.pull_request.number }} "$PR_BODY"
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/UpdateVersion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,15 @@ jobs:
pull-requests: write
contents: write
runs-on: ubuntu-latest
if: github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'github-actions[bot]'
steps:
- name: Generate a token
id: generate_token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- name: Update version
env:
PR_BODY: ${{ github.event.pull_request.body }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
pull-requests: write
checks: write
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.sha }} # to check out the actual pull request commit, not the merge commit
fetch-depth: 0 # a full history is required for pull request analysis
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sync-to-extern-contrib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
name: Syncing branches
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v6
- name: Set up Node
uses: actions/setup-node@v4
with:
Expand Down
96 changes: 96 additions & 0 deletions Update.json
Original file line number Diff line number Diff line change
Expand Up @@ -3192,6 +3192,102 @@
}
],
"Notes": "XMOJ-Script 2.5.0 新增了比赛题目切换器,方便您在题目之间快速切换。此功能默认启用,您也可以在设置中禁用它。本版本还修复了一个导致时间显示为“NaN年前”的错误, 更新了一些 CSS selector,以适应 XMOJ 网站的最新变化."
},
"2.5.1": {
"UpdateDate": 1759830659949,
"Prerelease": true,
"UpdateContents": [
{
"PR": 876,
"Description": "refactor: simplify SubmitLink selection by querying all anchors and finding by text"
}
],
"Notes": "No release notes were provided for this release."
},
"2.5.2": {
"UpdateDate": 1759845614758,
"Prerelease": true,
"UpdateContents": [
{
"PR": 877,
"Description": "fix: problem PID 可能为 null"
}
],
"Notes": "No release notes were provided for this release."
},
"2.5.3": {
"UpdateDate": 1770358959413,
"Prerelease": true,
"UpdateContents": [
{
"PR": 888,
"Description": "Fix AC code export for 5-digit question IDs"
}
],
"Notes": "No release notes were provided for this release."
},
"2.6.0": {
"UpdateDate": 1770426020324,
"Prerelease": false,
"UpdateContents": [
{
"PR": 876,
"Description": "refactor: simplify SubmitLink selection by querying all anchors and finding by text"
},
{
"PR": 877,
"Description": "fix: problem PID 可能为 null"
},
{
"PR": 888,
"Description": "Fix AC code export for 5-digit question IDs"
}
],
"Notes": "No release notes were provided for this release."
},
"2.6.1": {
"UpdateDate": 1770426401298,
"Prerelease": true,
"UpdateContents": [
{
"PR": 892,
"Description": "Update to release 2.6.0"
}
],
"Notes": "No release notes were provided for this release."
},
"2.7.0": {
"UpdateDate": 1770426883598,
"Prerelease": false,
"UpdateContents": [
{
"PR": 892,
"Description": "Update to release 2.6.0"
}
],
"Notes": "No release notes were provided for this release."
},
"2.7.1": {
"UpdateDate": 1770426896026,
"Prerelease": true,
"UpdateContents": [
{
"PR": 895,
"Description": "Update to release 2.7.0"
}
],
"Notes": "No release notes were provided for this release."
},
"2.7.2": {
"UpdateDate": 1770429143486,
"Prerelease": true,
"UpdateContents": [
{
"PR": 896,
"Description": "Update to release 2.7.0"
}
],
"Notes": "No release notes were provided for this release."
}
}
}
62 changes: 37 additions & 25 deletions XMOJ.user.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ==UserScript==
// @name XMOJ
// @version 2.5.0
// @version 2.7.2
// @description XMOJ增强脚本
// @author @XMOJ-Script-dev, @langningchen and the community
// @namespace https://github/langningchen
Expand Down Expand Up @@ -1645,7 +1645,28 @@ async function main() {
} else if (location.pathname == "/problem.php") {
await RenderMathJax();
if (SearchParams.get("cid") != null && UtilityEnabled("ProblemSwitcher")) {
document.getElementsByTagName("h2")[0].innerHTML += " (" + localStorage.getItem("UserScript-Contest-" + SearchParams.get("cid") + "-Problem-" + SearchParams.get("pid") + "-PID") + ")";
let pid = localStorage.getItem("UserScript-Contest-" + SearchParams.get("cid") + "-Problem-" + SearchParams.get("pid") + "-PID");
if (!pid) {
const contestReq = await fetch("https://www.xmoj.tech/contest.php?cid=" + SearchParams.get("cid"));
const res = await contestReq.text();
if (contestReq.status === 200 && res.indexOf("比赛尚未开始或私有,不能查看题目。") === -1) {
const parser = new DOMParser();
const dom = parser.parseFromString(res, "text/html");
const rows = (dom.querySelector("#problemset > tbody")).rows;
for (let i = 0; i < rows.length; i++) {
let problemIdText = rows[i].children[1].innerText; // Get the text content
let match = problemIdText.match(/\d+/); // Extract the number
if (match) {
let extractedPid = match[0];
localStorage.setItem("UserScript-Contest-" + SearchParams.get("cid") + "-Problem-" + i + "-PID", extractedPid);
}
}
pid = localStorage.getItem("UserScript-Contest-" + SearchParams.get("cid") + "-Problem-" + SearchParams.get("pid") + "-PID");
}
}
if (pid) {
document.getElementsByTagName("h2")[0].innerHTML += " (" + pid + ")";
}
let ContestProblemList = localStorage.getItem("UserScript-Contest-" + SearchParams.get("cid") + "-ProblemList");
if (ContestProblemList == null) {
const contestReq = await fetch("https://www.xmoj.tech/contest.php?cid=" + SearchParams.get("cid"));
Expand Down Expand Up @@ -1710,25 +1731,8 @@ async function main() {
document.querySelector("body > div > div.mt-3 > center").lastElementChild.style.marginLeft = "10px";
}
//修复提交按钮
let SubmitLink = document.querySelector('.mt-3 > center:nth-child(1) > a:nth-child(12)');
if (SubmitLink == null) { //a special type of problem
SubmitLink = document.querySelector('.mt-3 > center:nth-child(1) > a:nth-child(10)');
}
if (SubmitLink == null) {
SubmitLink = document.querySelector('.mt-3 > center:nth-child(1) > a:nth-child(11)');
}
if (SubmitLink == null) {
SubmitLink = document.querySelector('.mt-3 > center:nth-child(1) > a:nth-child(13)');
}
if (SubmitLink == null) {
SubmitLink = document.querySelector('.mt-3 > center:nth-child(1) > a:nth-child(9)');
}
if (SubmitLink == null) { //为什么这个破东西老是换位置
SubmitLink = document.querySelector('.mt-3 > center:nth-child(1) > a:nth-child(7)');
}
if (SubmitLink == null) { //tmd又换位置
SubmitLink = document.querySelector('.mt-3 > center:nth-child(1) > a:nth-child(8)');
}
const links = document.querySelectorAll('.mt-3 > center:nth-child(1) > a');
const SubmitLink = Array.from(links).find(a => a.textContent.trim() === '提交');
let SubmitButton = document.createElement('button');
SubmitButton.id = 'SubmitButton';
Comment on lines +1734 to 1737
Copy link

Copilot AI Feb 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new SubmitLink lookup can return undefined when no has text "提交". The subsequent uses (SubmitLink.href / SubmitLink.parentNode.replaceChild) will then throw and abort the rest of main(); please add a null-check and a fallback strategy (e.g., keep the original link, broaden matching rules, or skip the replacement when not found).

Copilot uses AI. Check for mistakes.
SubmitButton.className = 'btn btn-outline-secondary';
Expand All @@ -1744,8 +1748,7 @@ async function main() {
// Remove the button's outer []
let str = document.querySelector('.mt-3 > center:nth-child(1)').innerHTML;
let target = SubmitButton.outerHTML;
let result = str.replace(new RegExp(`(.?)${target}(.?)`, 'g'), target);
document.querySelector('.mt-3 > center:nth-child(1)').innerHTML = result;
document.querySelector('.mt-3 > center:nth-child(1)').innerHTML = str.replace(new RegExp(`(.?)${target}(.?)`, 'g'), target);
document.querySelector('html body.placeholder-glow div.container div.mt-3 center button#SubmitButton.btn.btn-outline-secondary').onclick = function () {
window.location.href = SubmitLink.href;
console.log(SubmitLink.href);
Expand Down Expand Up @@ -2999,8 +3002,17 @@ async function main() {
for (let i = 0; i < ACCode.length; i++) {
let CurrentCode = ACCode[i];
if (CurrentCode != "") {
let CurrentQuestionID = CurrentCode.substring(7, 11);
CurrentCode = CurrentCode.substring(14);
let lineBreakPos = CurrentCode.search(/[\r\n]/);
if (lineBreakPos === -1) continue;
let headerLine = CurrentCode.slice(0, lineBreakPos);
let digitMatch = headerLine.match(/\d+/);
if (!digitMatch) continue;
let CurrentQuestionID = digitMatch[0];
let bodyStart = lineBreakPos + 1;
if (CurrentCode[lineBreakPos] === '\r' && CurrentCode[lineBreakPos + 1] === '\n') {
bodyStart = lineBreakPos + 2;
}
CurrentCode = CurrentCode.slice(bodyStart);
CurrentCode = CurrentCode.replaceAll("\r", "");
Zip.file(CurrentQuestionID + ".cpp", CurrentCode);
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "xmoj-script",
"version": "2.5.0",
"version": "2.7.2",
"description": "an improvement script for xmoj.tech",
"main": "AddonScript.js",
"scripts": {
Expand Down
Loading