Skip to content

sync: dev to extern-contrib - #907

Merged
PythonSmall-Q merged 28 commits into
extern-contribfrom
dev
Feb 20, 2026
Merged

PythonSmall-Q merged 28 commits into
extern-contribfrom
dev

Conversation

@github-actions

@github-actions github-actions Bot commented Feb 16, 2026

Copy link
Copy Markdown
Contributor

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

    • Added "极简黑白界面风格" (MonochromeUI) toggle: monochrome palette, serif typography, sharp corners, 100ms transitions, automatic dark mode.
    • Version bumped to 3.2.0; Update.json updated.
    • CLAUDE.md: critical instructions for using xmoj-code-navigator with XMOJ.user.js.
  • Bug Fixes

    • Escaped HTML in more places to fix XSS: thread list titles, board name, reply edit info username, profile UserID/nickname, changelog descriptions.
    • Replaced loader.gif with Bootstrap spinner; swapped status emojis with [STD]/[OK]/[ERR]; reduced layout shift (non-blocking fetches); centered table cells and added spacing.
    • Responsive problem switcher; China-accessible font CDN; navbar geometry and blur overlay behavior gated behind the MonochromeUI toggle.

Written for commit 9583131. Summary will update on new commits.

boomzero and others added 14 commits February 16, 2026 09:35
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
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Feb 16, 2026

Copy link
Copy Markdown

Deploying xmoj-script-dev-channel with  Cloudflare Pages  Cloudflare Pages

Latest commit: 9583131
Status: ✅  Deploy successful!
Preview URL: https://f7e761ef.xmoj-script-dev-channel.pages.dev

View logs

@cubic-dev-ai cubic-dev-ai Bot left a comment

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.

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.

Comment thread package.json Outdated
{
"name": "xmoj-script",
"version": "2.7.3",
"version": "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: 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>
Suggested change
"version": "3.0.0",
"version": "2.7.3",
Fix with Cubic

Comment thread Update.json
],
"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

Comment thread XMOJ.user.js Outdated
// ==UserScript==
// @name XMOJ
// @version 2.7.3
// @version 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: 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>
Fix with Cubic

github-actions Bot and others added 7 commits February 16, 2026 15:15
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>
@hendragon-bot hendragon-bot Bot added the user-script This issue or pull request is related to the main user script label Feb 19, 2026
boomzero and others added 5 commits February 19, 2026 17:24
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>
@PythonSmall-Q
PythonSmall-Q merged commit 76b2b21 into extern-contrib Feb 20, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XL user-script This issue or pull request is related to the main user script

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants