sync: dev to extern-contrib - #907
Conversation
New "极简黑白界面风格" option under Beautify settings that overhauls the visual design with a monochrome palette, serif typography (Playfair Display + Source Serif 4), zero border-radius, and line-based visual structure. Key changes: - Comprehensive monochrome CSS with dark mode support (charcoal bg) - CSS variables for automatic light/dark theme switching - Sharp-cornered cards, modals, toasts with inverted headers - Monochrome buttons with filled primary / outlined secondary - Colored status buttons preserved (success/danger/warning/info) - Faster animations (100ms) and dropdown transitions - Problem switcher with solid bg, hidden on narrow screens - Copy button visibility fix in inverted headers - Image containment (max-width: 100%) - Table cell center alignment - Non-blocking status page fetches to reduce layout shift - Font loading via <link> element to avoid FOUC - Fully toggleable: disabling reverts to original Bootstrap styles Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…j-code-navigator agent - Emphasize the importance of using xmoj-code-navigator for exploring, searching, and understanding XMOJ.user.js - Provide guidelines on when and how to use the xmoj-code-navigator agent - Explain the benefits of using the agent over loading the entire file
- Replace std status emojis with text labels ([STD]/[OK]/[ERR]) - Replace loader.gif with Bootstrap spinner - Add table margin-top for spacing from elements above - Use bare element selectors for table header styling - Fix table cell text-align center - Soften dark mode colors (charcoal #1a1a1a bg, #e5e5e5 text) - Fix copy button visibility in inverted headers - Hide problem switcher on narrow screens - Differentiate btn-primary (filled) from btn-secondary (outlined) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Navbar applyStyles now conditionally applies monochrome (flat, full-width) or original (rounded, margin) styles based on MonochromeUI setting - Fixes inconsistency where createOverlay assumed rounded corners but navbar was always flat - Switch Google Fonts CDN from fonts.googleapis.com to fonts.loli.net for China accessibility Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When GetStdList returns Success: false, StdList remains null. Previously this fell through to the else branch, triggering redundant UploadStd requests for already-uploaded problems. Now the entire upload block is skipped when StdList is null. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add toggleable Minimalist Monochrome UI
Deploying xmoj-script-dev-channel with
|
| Latest commit: |
9583131
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://f7e761ef.xmoj-script-dev-channel.pages.dev |
There was a problem hiding this comment.
3 issues found across 4 files
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="package.json">
<violation number="1" location="package.json:3">
P2: Manual version bump violates the automated versioning workflow. Revert this change and let UpdateVersion.js handle the version update.</violation>
</file>
<file name="Update.json">
<violation number="1" location="Update.json:3314">
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.</violation>
</file>
<file name="XMOJ.user.js">
<violation number="1" location="XMOJ.user.js:3">
P2: Do not manually bump the userscript version; versioning is automated by UpdateVersion.js. Revert this change and let the workflow update @version.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
| { | ||
| "name": "xmoj-script", | ||
| "version": "2.7.3", | ||
| "version": "3.0.0", |
There was a problem hiding this comment.
P2: Manual version bump violates the automated versioning workflow. Revert this change and let UpdateVersion.js handle the version update.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At package.json, line 3:
<comment>Manual version bump violates the automated versioning workflow. Revert this change and let UpdateVersion.js handle the version update.</comment>
<file context>
@@ -1,6 +1,6 @@
{
"name": "xmoj-script",
- "version": "2.7.3",
+ "version": "3.0.0",
"description": "an improvement script for xmoj.tech",
"main": "AddonScript.js",
</file context>
| "version": "3.0.0", | |
| "version": "2.7.3", |
| ], | ||
| "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": { |
There was a problem hiding this comment.
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>
| // ==UserScript== | ||
| // @name XMOJ | ||
| // @version 2.7.3 | ||
| // @version 3.0.0 |
There was a problem hiding this comment.
P2: Do not manually bump the userscript version; versioning is automated by UpdateVersion.js. Revert this change and let the workflow update @Version.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At XMOJ.user.js, line 3:
<comment>Do not manually bump the userscript version; versioning is automated by UpdateVersion.js. Revert this change and let the workflow update @version.</comment>
<file context>
@@ -1,6 +1,6 @@
// ==UserScript==
// @name XMOJ
-// @version 2.7.3
+// @version 3.0.0
// @description XMOJ增强脚本
// @author @XMOJ-Script-dev, @langningchen and the community
</file context>
Update to release 3.1.0
Sanitize post title with escapeHTML() before inserting into innerHTML to prevent script injection via crafted post titles. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fix XSS in post title rendering
Sanitize user-controlled data with escapeHTML() before innerHTML insertion: - Post titles in thread list - Board name in thread view - EditPerson username in reply edit info - UserID and UserNick on profile page - Update description in changelog Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fix additional XSS vulnerabilities
Update to release 3.2.0
sync-branches: New code has just landed in dev, so let's bring extern-contrib up to speed!
Summary by cubic
Sync extern-contrib with dev by adding a toggleable Minimalist Monochrome UI and bumping the script to v3.2.0. Includes expanded XSS hardening and contributor guidance.
New Features
Bug Fixes
Written for commit 9583131. Summary will update on new commits.