Skip to content

ForceMobileView:停用 tiny-font 自動啟用邏輯#57

Merged
ChrisTorng merged 1 commit into
mainfrom
codex/fix-mobile-view-font-size-detection
May 20, 2026
Merged

ForceMobileView:停用 tiny-font 自動啟用邏輯#57
ChrisTorng merged 1 commit into
mainfrom
codex/fix-mobile-view-font-size-detection

Conversation

@ChrisTorng
Copy link
Copy Markdown
Owner

Motivation

  • 使用者希望 Force Mobile View 不再因為自動偵測頁面字體過小而自動啟用,改為僅在明確匹配 @match 的 URL 時自動啟用。

Description

  • 移除 tiny-font 偵測與啟用路徑,刪除了 shouldAutoEnableForTinyFonts 與相關的啟動分支,現在僅以符合 @match 的 URL 自動啟用行為。
  • 更新 userscript metadata 版本號為 2026-05-20_1.7.5 並同步調整 @description 以移除 tiny-font 描述。
  • 同步更新 README.md 中 Force Mobile View 的簡述以保持一致。
  • 調整 scripts/test-force-mobile-view.js 測試為驗證「非 match 的 tiny-font 頁面預設不自動啟用」,並更新 TestCases.md 對應說明。

Testing

  • 執行完整測試檔案 node --test scripts/test-force-mobile-view.js,結果為 6 個子測試中 4 個通過、2 個失敗(測試紀錄顯示有 2 個子測試失敗)。
  • 針對本次變更的核心路徑以篩選名稱執行測試 node --test --test-name-pattern "non-matched URLs no longer auto-enable mobile view even on tiny-font pages|matched URL auto-enables mobile view style" scripts/test-force-mobile-view.js,相關測試項目皆通過。

Codex Task

@vercel
Copy link
Copy Markdown

vercel Bot commented May 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
tampermonkey-scripts Ready Ready Preview, Comment May 20, 2026 11:26pm

@ChrisTorng ChrisTorng merged commit 10712f6 into main May 20, 2026
4 checks passed
@ChrisTorng ChrisTorng deleted the codex/fix-mobile-view-font-size-detection branch May 20, 2026 23:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant