Skip to content

v0.3.1 — 脚本内核路径自动探测

Pre-release
Pre-release

Choose a tag to compare

@KNLCXY KNLCXY released this 22 Oct 18:02
· 3 commits to main since this release

三个旁路脚本不再硬编码作者机器的内核路径。

改了什么

  • 新增 lib/detect-chrome.mjs:多根目录有界扫描(%LOCALAPPDATA% / %APPDATA% / Program Files / (x86) / ~/Desktop,深度 4–5)+ icudtl.dat / *.pak 特征校验 + 偏好排序(标准浏览器优先,豆包/夸克等应用内置排最后)
  • 三个脚本改为 DSH_CHROME → 自动探测,找不到才报错退出
  • 与独立仓库 dsh-github-scripts 内容对齐(那边也是同一份 lib/detect-chrome.mjs)

为什么拷贝而不是依赖

脚本要能单独 clone 下来就用,把插件当依赖反而抬高门槛。代价是改探测逻辑时两边同步 —— 两个文件顶部都写了这句提醒。

安装

dsh plugin --profile <你的 profile> remove dsh-github
dsh plugin --profile <你的 profile> add "file:<下载路径>/dsh-github-0.3.1.tgz"