sync: dev to extern-contrib

Merged
GI
2mo ago
+306-7

sync-branches: New code has just landed in dev, so let's bring extern-contrib up to speed!

Summary by Sourcery

Improve submission reliability during busy judge queues by adding robust captcha handling and local recognition.

New Features:

  • Add optional local recognition and manual entry support for XMOJ submission captchas, including refresh and fallback handling.

Bug Fixes:

  • Ensure captcha requirements are detected and enforced consistently when the judge queue state changes during submission.

Enhancements:

  • Centralize default-off setting behavior for debugging and interface replacement options.

Build:

  • Bump the userscript and package versions to 3.6.4.

Summary by cubic

Show and submit the server captcha on the custom submit page to prevent silent failures when the judge queue is busy. Previously the page dropped the vcode field; now it renders the captcha, includes vcode in POSTs, and blocks blank submissions.

  • Submit page mirrors the server captcha before DOM replacement, shows an image and input, refreshes on click, and expands the captcha area on “验证码错误”.
  • Always sends vcode; safe when the queue is idle because submit.php ignores the field.
  • Blocks “强制提交” if captcha is missing to avoid server vfail upgrading to 8‑char challenges.
  • Adds AutoCaptcha (default on): local, 4‑digit recognition that only fills when confident; otherwise leaves the field for manual entry.
  • Centralizes defaults via DefaultOffSettings; bumps version to 3.6.4 in package.json and updates release notes in Update.json.