Skip to content

sync: dev to extern-contrib - #1050

Merged
boomzero merged 16 commits into
extern-contribfrom
dev
Oct 6, 2026
Merged

boomzero merged 16 commits into
extern-contribfrom
dev

Conversation

@github-actions

@github-actions github-actions Bot commented Oct 6, 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 Sourcery

Improve administrator identification and video replay handling while keeping video player styling and controls intact.

New Features:

  • Display script administrators with violet usernames and a tooltip instead of a separate admin badge.
  • Set descriptive page titles for contest and problem video replay pages.

Bug Fixes:

  • Prevent monochrome styling and image enlargement from affecting video player controls and media.

Enhancements:

  • Apply administrator username styling independently of rating-color settings and preserve custom badge layout.

Chores:

  • Bump the userscript and package versions to 3.8.8 and add prerelease update metadata.

Summary by cubic

Syncs dev into extern-contrib, bringing script admins violet usernames with a tooltip instead of the separate admin badge, and fixes video replay page handling.

  • Applies the admin styling whether or not rating colors are enabled, preventing custom badges from wrapping onto a second line.
  • Stops the image enlarger from opening on video player images like the progress bar thumb.
  • Excludes video player controls from the monochrome skin and image sizing rules.
  • Sets descriptive page titles for contest and problem replay pages.
  • Updates the userscript and package version to 3.8.8 and adds prerelease update metadata.

Written for commit 1213cac. Summary will update on new commits.

Review in cubic

boomzero and others added 5 commits October 6, 2026 08:34
The 脚本管理员 badge plus a custom badge often wrapped onto a second line.
Admins now get a reserved violet username color with a 脚本管理员 tooltip,
whether or not ratings are shown, and the badge is removed. No rating tier
uses violet, so it cannot be mistaken for a rating.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E5dr7XTsCeoamqLSiT9rLp
Show script admins with violet names instead of a badge
@sourcery-ai

sourcery-ai Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Synchronizes extern-contrib with dev by adding dedicated violet styling and tooltip behavior for script administrators, removing their former badge, and releasing the changes as version 3.8.7 with updated metadata.

Flow diagram for script administrator username rendering

flowchart TD
    A[GetUsernameHTML] --> B{AdminUserList.includes}
    B -->|Yes| C[Add title 脚本管理员]
    C --> D[Apply xmoj-rating-admin violet class]
    D --> E[Render username without former admin badge]
    B -->|No| F{UtilityEnabled Rating}
    F -->|Yes| G[Apply rating-tier class]
    F -->|No| H[Render standard username]
    G --> E
    H --> E
Loading

File-Level Changes

Change Details Files
Replaces the separate script-admin badge with a dedicated violet username-link style and tooltip.
  • Adds normal and hover/focus admin color rules.
  • Prioritizes admin styling over rating tiers and applies it even when ratings are disabled.
  • Adds a Chinese admin tooltip and removes the former red badge while preserving regular user badges.
XMOJ.user.js
Bumps the project and userscript versions for the synchronized release.
  • Updates versions from 3.8.6 to 3.8.7.
XMOJ.user.js
package.json
Adds synchronized update metadata.
  • Introduces the new update manifest content.
Update.json

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

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

Latest commit: 1213cac
Status: ✅  Deploy successful!
Preview URL: https://1b29d169.xmoj-script-dev-channel.pages.dev

View logs

@sourcery-ai sourcery-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.

Hey - I've found 1 issue

Fixed security issues:

  • Cross-site scripting (XSS) via untrusted HTML/JS injection in web rendering sinks (link)
Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="XMOJ.user.js" line_range="707" />
<code_context>
         a.xmoj-rating-gray { color: #78828c !important; text-decoration-color: rgba(120, 130, 140, 0.5) !important; }
         a.xmoj-rating-gray:hover, a.xmoj-rating-gray:focus { color: #606870 !important; text-decoration-color: #606870 !important; }
+        a.xmoj-rating-admin { color: #a855f7 !important; text-decoration-color: rgba(168, 85, 247, 0.5) !important; }
+        a.xmoj-rating-admin:hover, a.xmoj-rating-admin:focus { color: #8644c6 !important; text-decoration-color: #8644c6 !important; }
 `;

</code_context>
<issue_to_address>
**Admin names are harder to read**

When the page is in dark theme and an admin username link is hovered or focused, `a.xmoj-rating-admin:hover` and `a.xmoj-rating-admin:focus` force `#8644c6` against Bootstrap’s `#212529` background, yielding about 3:1 contrast instead of the documented 3.3:1 minimum, so admin names are harder to read.

Use a hover and focus color that meets the documented contrast minimum in dark mode.
</issue_to_address>

Sourcery assessment

Approval pending. 1 finding to address first.

Blocking findings: XMOJ.user.js:707


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Comment thread XMOJ.user.js
a.xmoj-rating-gray { color: #78828c !important; text-decoration-color: rgba(120, 130, 140, 0.5) !important; }
a.xmoj-rating-gray:hover, a.xmoj-rating-gray:focus { color: #606870 !important; text-decoration-color: #606870 !important; }
a.xmoj-rating-admin { color: #a855f7 !important; text-decoration-color: rgba(168, 85, 247, 0.5) !important; }
a.xmoj-rating-admin:hover, a.xmoj-rating-admin:focus { color: #8644c6 !important; text-decoration-color: #8644c6 !important; }

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.

🟡 Medium · Admin names are harder to read

When the page is in dark theme and an admin username link is hovered or focused, a.xmoj-rating-admin:hover and a.xmoj-rating-admin:focus force #8644c6 against Bootstrap’s #212529 background, yielding about 3:1 contrast instead of the documented 3.3:1 minimum, so admin names are harder to read.

Use a hover and focus color that meets the documented contrast minimum in dark mode.

Prompt for AI agents
In `XMOJ.user.js` at line 707:

**Admin names are harder to read**

When the page is in dark theme and an admin username link is hovered or focused, `a.xmoj-rating-admin:hover` and `a.xmoj-rating-admin:focus` force `#8644c6` against Bootstrap’s `#212529` background, yielding about 3:1 contrast instead of the documented 3.3:1 minimum, so admin names are harder to read.

Use a hover and focus color that meets the documented contrast minimum in dark mode.

boomzero and others added 11 commits October 6, 2026 08:53
The Aliyun player on contest/problem replay pages renders its progress
bar thumb as an <img>, so clicking or dragging it opened the image
enlarger. Skip images inside the player container.

Closes #1003

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E5dr7XTsCeoamqLSiT9rLp
The global border-radius/box-shadow reset squared off Aliplayer's round
play button ring (showing a grey box), and the global img sizing rule
distorted its control icons. Exclude .prism-player descendants from both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E5dr7XTsCeoamqLSiT9rLp
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E5dr7XTsCeoamqLSiT9rLp
Fix image enlarger and minimalist skin on video replay pages; add page title
@hendragon-bot hendragon-bot Bot added the user-script This issue or pull request is related to the main user script label Oct 6, 2026
@boomzero
boomzero merged commit d8aa02f into extern-contrib Oct 6, 2026
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M 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.

1 participant