jipika/dsh-hide-buttons ↗★ 0

dsh-hide-buttons

Hide the conversation-header utility buttons (Session log export) and the sidebar plugin-market launcher by injecting CSS — no layout or behavior changes. 适合需要净化界面、隐藏会话头部工具按钮及侧栏插件市场启动器的用户。

패키지
dsh-hide-buttons
호환성
미검증
버전
0.1.0
라이선스
MIT
최근 업데이트
2026. 9. 24.

설치

검증된 bundle이 없거나 호환성 검사에 실패했습니다. 먼저 저장소 설명을 읽어 주세요. 전체 README 읽기 ↗

dsh-hide-buttons

Hide the conversation-header utility buttons and the sidebar plugin-market launcher with injected CSS — appearance only, no layout or behavioral change.

用注入的 CSS 隐藏会话头部右侧的 utility 按钮组(含 Session log 导出)与侧栏底部的插件市场启动按钮;纯外观,不改布局与行为。

license


它隐藏什么

目标选择器说明
会话头部 utilities 容器[class$="_headerUtilities"]官方把 Session log 等按钮渲染在这个容器里;CSS Modules 的哈希前缀随前端构建变化,但 _headerUtilities 后缀恒定,所以按属性后缀命中容器
导出按钮(后备规则).session-log-download万一按钮移到容器外,仍按原类名隐藏
侧栏底部「插件市场」启动按钮.dshMarketLauncher固定字面量类名(非哈希),可直接命中。市场功能本身不受影响:设置 → 插件 → 市场 tab 照样能用

注入是幂等的:`` 已存在就直接返回。要恢复原样,删掉插件的 cordis 行即可(不用重启应用,刷新页面即可)。

安装

两种装法任选其一(都会往 profile 的 dependencies 加一项,再配一行 insert):

# ① npm(快,走 registry)
dsh plugin --profile 
 add dsh-hide-buttons

# ② GitHub(源码直装,跟随 main 分支)
dsh plugin --profile 
 add github:jipika/dsh-hide-buttons
# ~/.dsh/profiles/
/cordis.patch.yml
- insert:
    - id: dsh-hide-buttons
      name: dsh-hide-buttons

desktop profile 被 Electron 独占(CLI 子命令会被拒),需手改 package.json + pnpm install; 改 client 半边必须重启应用(client bundle 在 host 启动时读进内存,刷新页面无效)。

实现

dsh-hide-buttons
  ├─ lib/index.js   host 半边:空 apply(),只为让 cordis 行能挂载 client bundle
  └─ lib/client.js  浏览器半边:__ModuleLoader__.load → 注入一段 

client 半边 inject = [],不注册任何 slot,也不碰官方 DOM 结构 —— 只追加一个 `` 元素。

已知限制

  • 依赖官方类名(_headerUtilities 后缀 / .dshMarketLauncher 字面量),前端大改即可能失效。
  • 用 display: none !important 隐藏整个 utilities 容器,所以同容器里的其它按钮会一起消失 (这是刻意的:只留主操作,去掉杂项)。
  • 只做减法:想单独控制某一个按钮,需要改选择器。

License

MIT © 2026 jipika