Redesign xmoj-script.uk and deploy the site on every push

Merged
BO
2mo ago
+1443-1509

What does this PR aim to accomplish?:

The project website (xmoj-script.uk) was dated, wordy (GPT-3.5-era copy), and full of dead links (xmoj-bbs.me, sso.xmoj-bbs.me). It also didn't tell Chrome/Edge users that they must allow userscripts, which is the most common "installed but nothing happens" cause.

How does this PR accomplish the above?:

Site (40babdc)

  • index.html rewritten in the userscript's MonochromeUI style: hero, 6-card feature grid, 3-step install with browser auto-detection (Chrome 138+ "允许用户脚本" toggle vs Developer mode for older Chrome/Edge, per Tampermonkey FAQ Q209), FAQ, feedback. Version is read live from Update.json.
  • Removed AdSense (we don't serve ads), Microsoft Clarity (Microsoft says it shouldn't be used on sites aimed at under-18s, and most users are minors), the inline GPL text, the screenshot carousel, and the SSO / xmoj-bbs.me links. Statuspage and the 萌ICP line are kept.
  • New shared site.css (tokens copied from MonochromeSkinCSS, with a note to keep them in sync) and site.js. Bootstrap 5.2.3 → 5.3.3 for data-bs-theme dark mode; fonts from the same fonts.loli.net mirror as the script.
  • 404.html rebuilt in the same style.
  • privacy.html / terms.html / child-protection.html rewritten in plain Chinese, based on an audit of what XMOJ-bbs master actually stores (session hash ≤5 days, read messages deleted after 5 days, analytics fields, images in a GitHub repo, AI badge moderation).
  • messages.html: only the dead SSO tab and its code are removed (it never redirected). Its visual style is unchanged.
  • sitemap.xml, robots.txt, README: moved to xmoj-script.uk.

CI / submodule (96c57e1)

  • Deployment is left to Cloudflare Pages' GitHub integration, which already builds every push: master → xmoj-script (www.xmoj-script.uk), dev → xmoj-script-dev-channel (dev. / ghpages.xmoj-script.uk, which DebugMode uses). Release.yml / Prerelease.yml no longer upload the site themselves. That upload duplicated every master deployment, and the GitHub Pages copy wasn't linked from anywhere.
  • .gitmodules tracks XMOJ-bbs master; Dependabot opens daily submodule bump PRs against dev.
  • backend bumped to a55c2b0. That includes XMOJ-bbs#72 (our log lines record only a session hash prefix), #73 (Workers AI over HTTP, because Cloudflare can't attach the ai binding on this account; cloudflare/workers-sdk#15973) and #74 (Workers invocation logs off, since they stored the notification WebSocket's ?SessionID= URL; replaced by our own per-request log line with no query string).

Privacy claim now holds: the page says server logs contain only a session hash prefix. XMOJ-bbs#72–#74 are deployed (build 8bc3b56e, 2026-10-05 11:34 UTC). Querying Workers Logs after the deploy finds no SessionID= entries, and the new per-request lines are present. Older raw entries age out under Cloudflare's log retention.

Testing (done locally with Playwright, Chromium):

  • Every changed page at 1280px and 390px, light and dark: no console errors, no horizontal overflow.
  • Browser detection with spoofed UAs (Chrome 140 / 130, Edge, Firefox, Safari) selects the right tab and Chrome version note; tab switching and the theme toggle (persisted across reload) work.
  • Link check on all changed pages. Only expected failures: Chrome Web Store (blocked from the test network), Open Collective (403 to bots).
  • messages.html login with a real account after the SSO removal: tested by the maintainer (2026-10-05).

By submitting this pull request, I confirm the following:

  1. I have read and understood the contributor's guide, as well as this entire template.
  2. I have commented on my proposed changes within the code.
  3. I have tested my changes.
  4. I am willing to help maintain this change if there are issues with it later.
  5. It is compatible with the GNU General Public License v3.0.
  6. I have squashed any insignificant commits.
  7. I have checked that another pull request for this purpose does not exist.
  8. I have considered and confirmed that this submission will be valuable to others.
  9. I accept that this submission may not be used, and the PR can be closed at the will of the maintainer.
  10. I give this submission freely and claim no ownership to its content.
  11. N/A: this PR doesn't change XMOJ.user.js, only the project website.

⚠️ Item 11 needs a human: this PR doesn't touch XMOJ.user.js, so XMOJ UI compatibility shouldn't be affected, but I couldn't verify it in a real browser on xmoj.tech.


  • I have read the above and my PR is ready for review.

🤖 Generated with Claude Code

https://claude.ai/code/session_017dqWu3YgeVRGwBt5pXDq4A


Summary by cubic

Redesigns xmoj-script.uk in the userscript's monochrome style and deploys site changes on every push instead of only when XMOJ.user.js changes. The new site replaces dead links and outdated content with clearer installation guidance, including the Chrome/Edge 138+ userscript toggle.

Site

  • Adds responsive light/dark themes, real lazy-loaded light and dark screenshots, feature and short-message sections, FAQ, feedback links, and browser-aware installation steps covering Chrome/Edge 138+; browser detection ignores legacy EdgeHTML Edge tokens.
  • Points confused Chrome/Edge users to an illustrated install guide.
  • Shows the latest stable version from Update.json, supports ScriptCat alongside Tampermonkey, and uses accessible browser toggles.
  • Rewrites the privacy, terms, and child-protection pages in plain Chinese, including the EU notice, a third-party services table, and the note that short messages are AES-encrypted at rest, so admins can't read them.
  • Removes the obsolete SSO login tab and Microsoft Clarity, and updates the README, sitemap, robots file, navigation, and 404 page for xmoj-script.uk.
  • Pins Bootstrap assets with SRI and makes the 404 page work under GitHub Pages project paths.

Deployment

  • Deploys GitHub Pages for master and dev, while Cloudflare Pages deploys from master; the jobs fail independently and Cloudflare deploys are serialized.
  • Keeps release workflows focused on publishing releases and adds daily Dependabot updates for the XMOJ-bbs submodule.
  • Bumps the backend submodule to a55c2b0, which includes the session-log redaction. The privacy wording depends on that XMOJ-bbs change being live, so its pending Cloudflare deployment must be retried before merging.

Summary by Sourcery

Modernize the XMOJ-Script website, improve installation and privacy guidance, remove obsolete integrations, and streamline push-based deployment.

New Features:

  • Redesign the xmoj-script.uk website with a responsive monochrome interface, light/dark themes, feature overview, FAQ, feedback section, and live version display.
  • Add browser-aware installation guidance for Chrome, Edge, Firefox, and Safari, including the required Chrome and Edge userscript permissions.
  • Rebuild the 404 page and provide consistent navigation, styling, and accessibility across the website.

Bug Fixes:

  • Remove obsolete SSO functionality and dead xmoj-bbs.me links from the website and messages page.
  • Clarify privacy, terms, and minor-protection information to reflect the services and data actually used.

Enhancements:

  • Centralize website styling and behavior in shared assets and upgrade the site to Bootstrap 5.3.3 with theme support.
  • Remove unused advertising, analytics, screenshot carousel, and embedded license content from the site.

CI:

  • Move website deployment out of release workflows so Cloudflare Pages can deploy from repository pushes.
  • Add daily Dependabot updates for the Git submodule.

Deployment:

  • Update the backend submodule to include session-log redaction and related service changes.
  • Update site metadata and documentation links for xmoj-script.uk.

Documentation:

  • Rewrite the README, sitemap, robots configuration, privacy statement, usage terms, and minor-protection page for the current website and services.

Tests:

  • Validate changed pages, responsive layouts, themes, browser detection, navigation, and links with Playwright.