Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
08f8493
Add toggleable Minimalist Monochrome UI (MonochromeUI setting)
boomzero Feb 16, 2026
5509e84
Add critical instructions for working with XMOJ.user.js and using xmo…
boomzero Feb 16, 2026
cff305d
Fix monochrome UI issues: emojis, loader, table spacing, dark mode
boomzero Feb 16, 2026
ad80452
2.7.4
github-actions[bot] Feb 16, 2026
8c39384
Update version info to 2.7.4
github-actions[bot] Feb 16, 2026
95ee27f
Update font link for MonochromeUI to use alternative CDN
boomzero Feb 16, 2026
ea13855
Update time and description of 2.7.4
github-actions[bot] Feb 16, 2026
a92de57
Gate navbar geometry behind MonochromeUI toggle and use China font CDN
boomzero Feb 16, 2026
908a3f0
Update time and description of 2.7.4
github-actions[bot] Feb 16, 2026
c150e31
Skip UploadStd when GetStdList fetch failed
boomzero Feb 16, 2026
9368f47
Update time and description of 2.7.4
github-actions[bot] Feb 16, 2026
4674c60
3.0.0
boomzero Feb 16, 2026
dbdfbb2
Update version info to 3.0.0
github-actions[bot] Feb 16, 2026
c31dced
Merge pull request #906 from XMOJ-Script-dev/monochrome-ui
boomzero Feb 16, 2026
c488e52
3.1.0
github-actions[bot] Feb 16, 2026
ccaef1b
Update to release 3.1.0
github-actions[bot] Feb 16, 2026
068092d
Merge pull request #909 from XMOJ-Script-dev/actions/temp
github-actions[bot] Feb 16, 2026
76ae832
Fix XSS vulnerability in post title rendering
boomzero Feb 19, 2026
eba35cd
3.1.1
github-actions[bot] Feb 19, 2026
bc07e57
Update version info to 3.1.1
github-actions[bot] Feb 19, 2026
f2b74a7
Merge pull request #910 from XMOJ-Script-dev/fix/xss-post-title
boomzero Feb 19, 2026
ececcfa
Fix additional XSS vulnerabilities in innerHTML assignments
boomzero Feb 19, 2026
9f41a71
3.1.2
github-actions[bot] Feb 19, 2026
e51cb29
Update version info to 3.1.2
github-actions[bot] Feb 19, 2026
103424b
Merge pull request #911 from XMOJ-Script-dev/fix/xss-additional-escaping
boomzero Feb 19, 2026
015b3ea
3.2.0
github-actions[bot] Feb 19, 2026
e155083
Update to release 3.2.0
github-actions[bot] Feb 19, 2026
9583131
Merge pull request #913 from XMOJ-Script-dev/actions/temp
github-actions[bot] Feb 19, 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
38 changes: 37 additions & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,48 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
## Project Overview

XMOJ-Script is a browser userscript that enhances the XMOJ online judge platform (xmoj.tech). This repository consists of:
- **Main userscript** (`XMOJ.user.js`): ~5000 line single-file userscript with all features. As this file is very large you should use the xmoj-code-navigator agent to help you whenever possible.
- **Main userscript** (`XMOJ.user.js`): ~5000 line single-file userscript with all features. **See "Working with XMOJ.user.js" section below for CRITICAL instructions on using the xmoj-code-navigator agent.**
- **Update/version management scripts** (`Update/`): Automation for version bumping and releases
- **Metadata and documentation**: `Update.json` tracks version history, README and contributing guides

The `backend/` directory is a git submodule pointing to https://github.com/XMOJ-Script-dev/XMOJ-bbs and should be modified in that repository, not here.

## Working with XMOJ.user.js (CRITICAL)

**IMPORTANT: Due to the large size of XMOJ.user.js (~5000 lines), you MUST use the xmoj-code-navigator agent whenever you need to explore, search, or understand any part of this file.**

### When to use xmoj-code-navigator

Use the Task tool with `subagent_type="xmoj-code-navigator"` for:

- **Finding specific functions or features**: "Where is the auto-refresh functionality implemented?"
- **Understanding code sections**: "How does the login authentication work?"
- **Locating code patterns**: "Find all API calls to the backend"
- **Searching for specific implementations**: "Show me the dark mode toggle implementation"
- **Verifying if code exists**: "Does XMOJ.user.js have a function for parsing XML?"
- **ANY exploration task involving XMOJ.user.js**

### Why use this agent

Loading the entire XMOJ.user.js file into context:
- Wastes context window space
- Makes responses slower
- Is unnecessary when you only need specific sections

The xmoj-code-navigator agent efficiently locates and retrieves only the relevant code sections you need.

### Example usage

```
Instead of: Read tool on XMOJ.user.js (loads entire 5000 lines)
Use: Task tool with xmoj-code-navigator agent to find specific sections
```

**Exception**: Only use Read tool on XMOJ.user.js when:
- You need to edit a specific line number you already know
- You're making targeted edits and already know the exact location
- You need to verify a small, specific section (use offset and limit parameters)

## Development Workflow

### Branch Structure and PR Requirements
Expand Down
86 changes: 86 additions & 0 deletions Update.json
Original file line number Diff line number Diff line change
Expand Up @@ -3299,6 +3299,92 @@
}
],
"Notes": "Adds WebSocket-based real-time notification system for BBS mentions and mail notifications. Notifications now arrive within 1-2 seconds instead of requiring page focus. Includes automatic reconnection with exponential backoff and fallback to polling when WebSocket is unavailable."
},
"2.7.4": {
"UpdateDate": 1771211196807,
"Prerelease": true,
"UpdateContents": [
{
"PR": 906,
"Description": "Add toggleable Minimalist Monochrome UI"
}
],
"Notes": "Added a new toggleable \"极简黑白界面风格\" (Minimalist Monochrome UI) setting under Beautify options. Features serif typography, zero border-radius, line-based visual structure, and automatic dark mode support with charcoal tones."
},
"3.0.0": {

@cubic-dev-ai cubic-dev-ai Bot Feb 16, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2: The new 3.0.0 entry duplicates the 2.7.4 release metadata (same PR/description/notes). This makes the update history inconsistent and can mislead release tooling or users. Ensure 3.0.0 has its own distinct release details, or remove the duplicate entry.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At Update.json, line 3314:

<comment>The new 3.0.0 entry duplicates the 2.7.4 release metadata (same PR/description/notes). This makes the update history inconsistent and can mislead release tooling or users. Ensure 3.0.0 has its own distinct release details, or remove the duplicate entry.</comment>

<file context>
@@ -3299,6 +3299,28 @@
+            ],
+            "Notes": "Added a new toggleable \"极简黑白界面风格\" (Minimalist Monochrome UI) setting under Beautify options. Features serif typography, zero border-radius, line-based visual structure, and automatic dark mode support with charcoal tones."
+        },
+        "3.0.0": {
+            "UpdateDate": 1771211353041,
+            "Prerelease": true,
</file context>
Fix with Cubic

"UpdateDate": 1771211353041,
"Prerelease": true,
"UpdateContents": [
{
"PR": 906,
"Description": "Add toggleable Minimalist Monochrome UI"
}
],
"Notes": "Added a new toggleable \"极简黑白界面风格\" (Minimalist Monochrome UI) setting under Beautify options. Features serif typography, zero border-radius, line-based visual structure, and automatic dark mode support with charcoal tones."
},
"3.1.0": {
"UpdateDate": 1771254908784,
"Prerelease": false,
"UpdateContents": [
{
"PR": 895,
"Description": "Update to release 2.7.0"
},
{
"PR": 896,
"Description": "Update to release 2.7.0"
},
{
"PR": 905,
"Description": "Add WebSocket notification system for real-time BBS and mail mentions"
},
{
"PR": 906,
"Description": "Add toggleable Minimalist Monochrome UI"
},
{
"PR": 906,
"Description": "Add toggleable Minimalist Monochrome UI"
}
],
"Notes": "v3 显然需要在新年第一天发布("
},
"3.1.1": {
"UpdateDate": 1771489733913,
"Prerelease": true,
"UpdateContents": [
{
"PR": 910,
"Description": "Fix XSS in post title rendering"
}
],
"Notes": "Fixed a stored XSS vulnerability in discussion thread post titles."
},
"3.1.2": {
"UpdateDate": 1771493127347,
"Prerelease": true,
"UpdateContents": [
{
"PR": 911,
"Description": "Fix additional XSS vulnerabilities"
}
],
"Notes": "Fixed additional stored XSS vulnerabilities where user-controlled data was inserted into innerHTML without sanitization."
},
"3.2.0": {
"UpdateDate": 1771493320789,
"Prerelease": false,
"UpdateContents": [
{
"PR": 910,
"Description": "Fix XSS in post title rendering"
},
{
"PR": 911,
"Description": "Fix additional XSS vulnerabilities"
}
],
"Notes": "No release notes were provided for this release."
}
}
}
Loading