Draft
Conversation
Introduce an ImageEnlarger utility: add a toggle option to the feature list and implement a modal image viewer with CSS, toolbar (zoom in/out, reset, save), keyboard shortcuts, and click-to-open behavior. Images are annotated with a preview class and the feature ignores gravatar/cravatar sources; it applies to existing and dynamically added images via a MutationObserver. Errors are logged and surface a DebugMode alert when enabled.
…rc, and MutationObserver performance Co-authored-by: PythonSmall-Q <106425289+PythonSmall-Q@users.noreply.github.com>
Co-authored-by: PythonSmall-Q <106425289+PythonSmall-Q@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Shan Wenxiao <seanoj_noreply@yeah.net>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Shan Wenxiao <seanoj_noreply@yeah.net>
Fix ImageEnlarger: accessibility, modal re-entry, responsive images, MutationObserver perf
Co-authored-by: PythonSmall-Q <106425289+PythonSmall-Q@users.noreply.github.com>
Co-authored-by: PythonSmall-Q <106425289+PythonSmall-Q@users.noreply.github.com>
Co-authored-by: PythonSmall-Q <106425289+PythonSmall-Q@users.noreply.github.com>
Fix image viewer: broken pan, missing wheel zoom, download navigates instead of saving
Add ImageEnlarger feature with modal viewer
* Update Update.json Signed-off-by: Zhu Chenrui <boomzero_zcr@outlook.com> * Parse release notes from comment block (cherry picked from commit c7137ff) * Update bug.yml Signed-off-by: Zhu Chenrui <boomzero_zcr@outlook.com> (cherry picked from commit 07d7590) Update feature.yml Signed-off-by: Zhu Chenrui <boomzero_zcr@outlook.com> (cherry picked from commit 1a99430) Update docs.yml Signed-off-by: Zhu Chenrui <boomzero_zcr@outlook.com> (cherry picked from commit 6017bcf) * Update GitHub Actions workflow to skip bot triggers Signed-off-by: Shan Wenxiao <seanoj_noreply@yeah.net> * Prevent UpdateVersion from running if last commit was by github-actions[bot] This prevents infinite loops where the bot commits version updates, which triggers the workflow again, causing another commit. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * Allow metadata updates on edited PRs after bot version commit The last-commit-author guard now only exits for non-edited events, so PR title/body changes still update Update.json metadata even when the branch tip is a github-actions[bot] commit. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Allow metadata updates on edited PRs after bot version commit Exclude all bot actors (not just github-actions[bot]) from triggering the UpdateVersion workflow, preventing loops from AI code review bots. Allow edited events through the script-level guard so PR title/body changes still update Update.json metadata. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Fix Problem Switcher Not Update * Fix Problem Switcher Not Update * 3.3.2 * Update version info to 3.3.2 * Fix Version List (1.999999.0 -> 1.10.0) Signed-off-by: zsTree <wa2025666@gmail.com> * Update time and description of 3.3.2 * Fix Problem Switcher Null Problem Signed-off-by: zsTree <wa2025666@gmail.com> * Update time and description of 3.3.2 * Fix XSS bug Signed-off-by: zsTree <wa2025666@gmail.com> * Update time and description of 3.3.2 --------- Signed-off-by: Zhu Chenrui <boomzero_zcr@outlook.com> Signed-off-by: Shan Wenxiao <seanoj_noreply@yeah.net> Signed-off-by: zsTree <wa2025666@gmail.com> Co-authored-by: Zhu Chenrui <boomzero_zcr@outlook.com> Co-authored-by: Shan Wenxiao <seanoj_noreply@yeah.net> Co-authored-by: boomzero <thomas_rainbowfish@icloud.com> Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Signed-off-by: zsTree <wa2025666@gmail.com>
Signed-off-by: zsTree <wa2025666@gmail.com>
Signed-off-by: zsTree <wa2025666@gmail.com>
Signed-off-by: zsTree <wa2025666@gmail.com>
…tent Display status.php Query Content
Fixes #932. Header black/white forcing and inline style clearing on contestrank-oi.php and contestrank-correct.php now only apply when MonochromeUI is enabled. Badge ranks, color-coded cells, and auto-refresh remain unconditional as part of the base UI. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Desktop/mobile login tab priority: bookmarklet on desktop (pointer: fine), session on mobile - Replace sender name links with Bootstrap popovers showing user info popup - Image zoom: cursor: zoom-in/zoom-out, title tooltip on images - Global Ctrl+V paste handler for images anywhere in thread view - Auto-resize compose textarea as user types Co-authored-by: PythonSmall-Q <106425289+PythonSmall-Q@users.noreply.github.com>
Co-authored-by: PythonSmall-Q <106425289+PythonSmall-Q@users.noreply.github.com>
Co-authored-by: PythonSmall-Q <106425289+PythonSmall-Q@users.noreply.github.com>
…nfo modal Co-authored-by: PythonSmall-Q <106425289+PythonSmall-Q@users.noreply.github.com>
…in userinfo fetch Co-authored-by: PythonSmall-Q <106425289+PythonSmall-Q@users.noreply.github.com>
…-button Remove problem translate button
Co-authored-by: PythonSmall-Q <106425289+PythonSmall-Q@users.noreply.github.com>
…ck + auto-scroll fix Co-authored-by: PythonSmall-Q <106425289+PythonSmall-Q@users.noreply.github.com>
feat(messages.html): user badges, contact search, auto-scroll to latest
Add caption "点击任意行打开对话 →" above table and a › chevron in a trailing column on each row. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add update information for version 3.3.5 including notes and description. Signed-off-by: Shan Wenxiao <seanoj_noreply@yeah.net>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com> Signed-off-by: Shan Wenxiao <seanoj_noreply@yeah.net>
Restored: contact search, renderMailList, mailListCache, user badges, user info modal, userSpan, auto-resize textarea, global paste handler, requestAnimationFrame scroll, setLoginTab, dark-mode table-primary fix. Added on top: caption "点击任意行打开对话 →" and › chevron column to make list rows obviously clickable. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Shan Wenxiao <seanoj_noreply@yeah.net>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Shan Wenxiao <seanoj_noreply@yeah.net>
Signed-off-by: Shan Wenxiao <seanoj_noreply@yeah.net>
feat: messages.html WebUI for short messages
Reviewer's GuideUpdates the XMOJ userscript and web UI to version 3.3.5 by extracting reusable contest problem-list fetching logic, adding a configurable image-enlargement feature, improving status filter state handling, guarding monochrome rank-table styling behind a flag, fixing minor text issues, switching CDN origins, and introducing a standalone short-message Web UI (messages.html) that talks to the existing API and supports rich messaging and image upload without the userscript. Sequence diagram for contest problem list fetching and refreshingsequenceDiagram
participant User
participant ProblemPage as Problem_page_script
participant GetContestProblemList as GetContestProblemList_fn
participant XMOJContest as xmoj.tech_contest_php
participant LocalStorage
User->>ProblemPage: Open problem.php?cid&pid
ProblemPage->>LocalStorage: get(UserScript-Contest-{cid}-ProblemList)
alt ProblemList not in LocalStorage
ProblemPage->>GetContestProblemList: GetContestProblemList(false)
GetContestProblemList->>XMOJContest: fetch(contest.php?cid={cid})
XMOJContest-->>GetContestProblemList: HTML (problemset table)
GetContestProblemList->>GetContestProblemList: parse DOM & build problemList
GetContestProblemList->>LocalStorage: set(UserScript-Contest-{cid}-ProblemList, JSON)
GetContestProblemList-->>ProblemPage: resolved
ProblemPage->>LocalStorage: get(UserScript-Contest-{cid}-ProblemList)
end
ProblemPage->>ProblemPage: render problemSwitcher UI from ContestProblemList
User->>ProblemPage: Click refresh link
ProblemPage->>GetContestProblemList: GetContestProblemList(true)
GetContestProblemList->>XMOJContest: fetch(contest.php?cid={cid})
XMOJContest-->>GetContestProblemList: HTML (updated)
GetContestProblemList->>GetContestProblemList: rebuild problemList
GetContestProblemList->>LocalStorage: update Contest-{cid}-ProblemList
GetContestProblemList->>ProblemPage: if RefreshList then location.reload()
Sequence diagram for WebUI login and session establishmentsequenceDiagram
actor User
participant Browser
participant XMOJSite as xmoj.tech
participant MessagesHTML as messages_html
participant LocalStorage
User->>Browser: Open xmoj.tech and log in
Browser->>XMOJSite: POST login
XMOJSite-->>Browser: Set PHPSESSID cookie
par Manual_session_login
User->>Browser: Open messages.html
Browser->>MessagesHTML: load page
MessagesHTML->>LocalStorage: load stored session (if any)
alt No stored session
User->>MessagesHTML: Enter username + PHPSESSID
MessagesHTML->>LocalStorage: save username, PHPSESSID
end
MessagesHTML-->>User: Show inbox via API
and Bookmarklet_login
User->>Browser: Click bookmarklet on xmoj.tech
Browser->>Browser: Extract username + PHPSESSID from page and cookie
Browser->>Browser: Redirect to messages.html#session=username:PHPSESSID
Browser->>MessagesHTML: load page with hash
MessagesHTML->>MessagesHTML: parse #session
MessagesHTML->>LocalStorage: save username, PHPSESSID
MessagesHTML-->>User: Show inbox via API
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary by Sourcery
Update the userscript and website to add an image enlargement utility, improve contest/problem and status filtering UX, and introduce a standalone web UI for XMOJ private messages, along with minor UI tweaks and asset/CDN updates.
New Features:
Bug Fixes:
Enhancements:
Build:
Documentation:
Summary by cubic
Ships v3.3.5 with a new ImageEnlarger in the userscript and a standalone
messages.htmlWebUI for short messages. Also improves contest problem switching andstatus.phpfilters, gates monochrome styling, removes the problem translate buttons, and switches the site CDN.New Features
XMOJ.user.jsImageEnlarger: modal viewer with zoom/pan, mouse wheel, keyboard, and download; toggleable; applies to dynamic images and skips avatar hosts.messages.html: read/send short messages on any device (PHPSESSID or bookmarklet login), image paste/upload, user badges, contact search, dark mode, auto-scroll/refresh.status.phpshows and preserves current query values with basic validation.Bug Fixes
MonochromeUI.cdnjs; updatepackage.json/Update.jsonto 3.3.5.Written for commit 3ea071d. Summary will update on new commits.