Skip to content

Repository files navigation

Chris's Userscripts

安裝方式

  1. 安裝 Tampermonkey 瀏覽器擴充套件(ChromeEdgeFirefoxSafariOpera
  2. Chrome 用戶:前往 chrome://extensions/ 並開啟右上角的 Developer mode
  3. Tampermonkey 設定:進入 Tampermonkey Settings → 將 Config mode 改為 Advanced
  4. Content Script API 改為 UserScripts API Dynamic

⚠️ 若未更改步驟 4 的設定,首次開啟 Chrome 的分頁將不會套用腳本,需手動重新整理頁面才會生效。

  1. 點擊下方的 Install 連結即可安裝對應腳本

通用

以下腳本皆為獨立運作,可依需求個別安裝。

名稱 說明 版本 安裝
移除 URL 追蹤 自動移除 URL 中的追蹤參數,保護您的隱私。
所有網站皆會清除高辨識度追蹤名稱與前綴;Amazon ufe 等站點參數只在精確 hostname 規則中處理,並保留其他網站的同名參數及語言、篩選、商品款式與訂房狀態等功能性資料。
0.4.5 Install
複製當前網址 按下 Ctrl+Shift+C 複製當前網址。
特定網站改寫 URL:
・在 X/Twitter 上轉換為 fxTwitter 連結,並於單篇貼文操作列加入複製按鈕。
・在 Threads 上轉換為 vxThreads(vxthreads.com)連結。
・在 Amazon.co.jp 上將商品網址簡化為 /dp/ASIN 格式。
・在 PChome 24h 上轉換為 Pancake 連結。
・在蝦皮上轉換為短網址。
0.4.3 Install
社群媒體影片音量鎖定 為 Facebook、Instagram、Threads、X 的影片設定預設音量與靜音狀態。可透過 Tampermonkey 選單設定;影片可使用平台內建音量滑桿自由調整,切換到下一支影片時會恢復設定音量,避免突然爆音。 0.1.3 Install
Medium 付費牆繞過 自動跳轉至第三方服務閱讀 Medium 全文。
透過 Tampermonkey 選單切換預設服務(Freedium / Archive.today / ReadMedium)。
支援自動跳轉開關切換。
0.1.1 Install
Threads 自動點擊 Spoiler 自動點擊 Threads 的 Spoiler 按鈕,揭露被隱藏的文字、圖片與影片內容。
支援多語系標籤偵測(Spoiler / 劇透 / 爆雷 / 스포일러 / ネタバレ)。
0.1.1 Install

Gemini

名稱 說明 版本 安裝
Gemini 固定使用模型 自動將 Gemini 切換為指定模型 (Pro / Fast / Thinking)
並透過 Tampermonkey 選單手動切換固定模型。
0.4.4 Install

替換字體

名稱 說明 版本 安裝
替換字體為 AppleGothic 將頁面字體改為 AppleGothic (簡體用 AppleGothicSC)
還原字體因替換而對 Icon Font 造成的影響。
程式碼區域的英數優先使用 Cascadia Code 等寬字體,中文在 generic monospace 前回退至 AppleGothic;GitHub #read-only-cursor-text-area 另以 inline !important 抵抗動態樣式。
支援黑名單管理,可針對特定網站停用。
0.4.7 Install

測試與驗證

專案使用 Node.js 內建的 node:testnode:vm 與最小 DOM/GM stub,不需要安裝額外套件。目前共有 8 個測試檔、92 項測試,七支正式 userscript 均有獨立行為測試。

node --test
Get-ChildItem -File -Filter '*.user.js' | ForEach-Object { node --check $_.FullName }
Get-ChildItem -Recurse -File -Path 'tests' -Filter '*.js' | ForEach-Object { node --check $_.FullName }

維護索引

腳本/文件 主要入口與職責 行為測試
remove-url-tracker.user.js cleanURL() 套用跨站與精確站點清理規則;cleanCurrentURL() History 整合 tests/remove-url-tracker.test.js
copy-current-url.user.js copyCurrentUrl() 複製與派送;convertToVxThreads() 轉換 Threads 網址;convertToAmazonShort() 簡化 Amazon 商品網址;processActionGroup() 插入 X 按鈕 tests/copy-current-url.test.js
social-media-volume-fix.user.js syncToPage() 套用播放預設值;getVolumeChangeCorrectionState()handleMediaStateChange() 以每影片有限 burst 協調平台調整;processVideoScanQueue()queueVideoScanContinuation() 逐幀掃描並從 removal 後方局部續接 tests/social-media-volume-fix.test.js
bypass-medium-paywall.user.js isServiceUrl() 服務站辨識;redirect() 跳轉 tests/bypass-medium-paywall.test.js
threads-auto-reveal-spoiler.user.js revealSpoilersIn() 揭露內容;queueScan() 分幀掃描 tests/threads-auto-reveal-spoiler.test.js
gemini-fixed-mode.user.js waitForElement() 等待介面;switchToMode() 切換模式 tests/gemini-fixed-mode.test.js
force-fonts-applegothic.user.js initStyles() 程式碼中英文字型 fallback;processElement() 字體/Icon 判定;setupMutationObserver() 增量掃描 tests/force-fonts-applegothic.test.js
README.md/metadata 版本、反向連結與 JSDoc 一致性 tests/documentation-consistency.test.js

參考來源

大部分的 Code 都由 Claude Opus 4.6 Thinking 完成

About

Chris's Userscript

Resources

Stars

5 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages