Merged
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideRemoves the problem translation buttons on the problem page to fix the misaligned problem title, and bumps the userscript version from 3.3.4 to 3.3.5. Flow diagram for problem page DOM updates removing translation buttonsflowchart TD
A[Location is /problem.php] --> B[Get element lang_cn_to_en]
A --> C[Get element lang_en_to_cn]
B --> D{transZhEn is not null}
C --> E{transEnZh is not null}
D -- Yes --> F[Remove transZhEn from DOM]
D -- No --> G[Skip removing transZhEn]
E -- Yes --> H[Remove transEnZh from DOM]
E -- No --> I[Skip removing transEnZh]
F --> J[Call RenderMathJax]
G --> J
H --> J
I --> J
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
boomzero
approved these changes
Mar 15, 2026
Member
boomzero
left a comment
There was a problem hiding this comment.
If you confirm it works, pls merge
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- Consider adding a short comment above the translation-button removal explaining that this is done to fix the problem title centering, so future maintainers understand why these elements are being removed.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider adding a short comment above the translation-button removal explaining that this is done to fix the problem title centering, so future maintainers understand why these elements are being removed.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
There was a problem hiding this comment.
1 issue found across 1 file
Prompt for AI agents (unresolved 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="XMOJ.user.js">
<violation number="1" location="XMOJ.user.js:3">
P2: Don't manually bump `@version` here; it is now out of sync with `package.json` and the release automation expects these versions to stay synchronized.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
| // ==UserScript== | ||
| // @name XMOJ | ||
| // @version 3.3.4 | ||
| // @version 3.3.5 |
There was a problem hiding this comment.
P2: Don't manually bump @version here; it is now out of sync with package.json and the release automation expects these versions to stay synchronized.
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>Don't manually bump `@version` here; it is now out of sync with `package.json` and the release automation expects these versions to stay synchronized.</comment>
<file context>
@@ -1,6 +1,6 @@
// ==UserScript==
// @name XMOJ
-// @version 3.3.4
+// @version 3.3.5
// @description XMOJ增强脚本
// @author @XMOJ-Script-dev, @langningchen and the community
</file context>
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.
What does this PR aim to accomplish?
Fix the title of the problem is not centered.
How does this PR accomplish the above?
Remove problem translate button.
By submitting this pull request, I confirm the following:
git rebase)Summary by Sourcery
Update the XMOJ userscript to remove problem translation controls on the problem page so the problem title layout is centered correctly.
Bug Fixes:
Enhancements:
Summary by cubic
Removed the translation buttons on
/problem.phpto fix the off-center problem title and prevent layout shift. Elements#lang_cn_to_enand#lang_en_to_cnare now removed on load.Written for commit 2d0c226. Summary will update on new commits.