Repository navigation
sync: dev to extern-contrib - #1050
Conversation
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
Reviewer's guide (collapsed on small PRs)Reviewer's GuideSynchronizes 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 renderingflowchart 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
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Deploying xmoj-script-dev-channel with
|
| Latest commit: |
1213cac
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://1b29d169.xmoj-script-dev-channel.pages.dev |
There was a problem hiding this comment.
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
| 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; } |
There was a problem hiding this comment.
🟡 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.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
…ript-dev/XMOJ-Script into fix-video-thumb-enlarger
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E5dr7XTsCeoamqLSiT9rLp
…ript-dev/XMOJ-Script into fix-video-thumb-enlarger
Fix image enlarger and minimalist skin on video replay pages; add page title
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:
Bug Fixes:
Enhancements:
Chores:
Summary by cubic
Syncs
devintoextern-contrib, bringing script admins violet usernames with a tooltip instead of the separate admin badge, and fixes video replay page handling.3.8.8and adds prerelease update metadata.Written for commit 1213cac. Summary will update on new commits.