diff --git a/github-zh-tw.user.js b/github-zh-tw.user.js index a72709e..b6fe12c 100644 --- a/github-zh-tw.user.js +++ b/github-zh-tw.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name GitHub 中文化 (繁體) // @namespace https://github.com/scriptscat/scriptcat -// @version 0.17 +// @version 0.18 // @description 幫 GitHub 導覽列、按鈕、屬性換成繁體中文,支援 SPA 動態更新,不亂翻、不卡頓。 // @match https://github.com/* // @run-at document-idle @@ -182,8 +182,9 @@ ['Recently updated', '最近更新'], ['Dismiss', '關閉提示'], ['Want to contribute to', '想貢獻給'], - ['If you have a bug or an idea, read the contributing guidelines before opening an issue', '若您發現錯誤或有新想法,請先閱讀貢獻指引再開啟問題'], - ['read the contributing guidelines', '請閱讀貢獻指引'], + // 此橫幅實際是三段文字節點:前段文字 + contributing guidelines + 後段文字。 + // 整句條目永遠不會匹配(跨不過 邊界),只靠三個片段湊。 + ['If you have a bug or an idea, read the', '若您發現錯誤或有新想法,請先閱讀'], ['contributing guidelines', '貢獻指引'], ['before opening an issue', '再開啟問題'], ['Never', '從未'], @@ -312,6 +313,12 @@ '.subnav-search-context', 'input[name="q"] ~ *', '.pl-c1', '.pl-s', '.pl-en', '.pl-k', '.pl-v', '.pl-smi', '.pl-s1', + // 2026 新版 React SearchBar:filter 語法 token 用 data-type 標記(is / state / open / issue 等), + // 外層 form 只有 role="form" 不是 role="search",原規則抓不到。 + '[data-type="filter-expression"]', + '[data-type="filter"]', + '[data-type="filter-value"]', + '.styled-input-container', // Labels(使用者自定義 label 顏色塊) 'a.IssueLabel', '.IssueLabel',