npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

dsh-icon-custom

v0.7.0

Published

自定义浏览器标签页图标:在设置页上传 SVG/PNG/ICO,立即生效并持久保存,自动适配安卓/iOS/平板 PWA 图标。· Custom browser tab favicon: upload SVG/PNG/ICO from the settings page, applies instantly and persists, auto-sizes PWA icons for Android/iOS/tablets.

Readme

dsh-icon-custom

自定义 DSH 浏览器标签页图标(favicon):在设置页上传 SVG / PNG / ICO / JPEG,立即生效并持久保存,刷新或重启后都保留。从 0.7.0 起,PWA / Logo 路径会自动派生各平台的标准图标尺寸,同一张上传图即可适配安卓、iOS 和平板。

纯 JS 依赖(jimp),无原生二进制,在 pnpm 供应链政策下也能干净安装。

安装

dsh plugin --profile web add dsh-icon-custom

带 scope 的包名:@cowwo/dsh-icon-custom

使用

  1. 打开设置 → icon管理
  2. 点击上传图标,选择 SVG、PNG 或 ICO(最大 10 MB)。
  3. 当前标签页图标立即替换;文件会保存到 $DSH_HOME/custom-favicon/
  4. 点击恢复默认清除自定义图标,回到平台默认图标。

PWA 安装图标

勾选同时替换 PWA 安装图标(勾选状态按图标记录保存),网页「安装为应用 / 添加到主屏幕」后,桌面和启动器上的图标也会换成你上传的这张。插件会把 /manifest.webmanifest 的 icons 项改写为自动派生的标准 PNG 集合:192×192 any512×512 any,以及一个 512×512 maskable 变体(不透明背景),让安卓启动器能干净裁剪;在 iPhone/iPad 上还会把 <link rel="apple-touch-icon"> 指向派生的 180×180 不透明 PNG(iOS 不支持 SVG 触屏图标,也不接受透明图)。

SVG 会在浏览器里先栅格化成 512×512 PNG 再上传,ICO 则由后端提取内嵌 PNG,所以任何格式都能生成可用的跨平台图标。若派生失败则回退为原样透传上传图。推荐上传规范的 512×512 PNG,效果最佳。

该选项默认不勾选:不勾选时行为与之前完全一致,平台 manifest 原样透传。浏览器按自己的节奏重新检查 manifest,已经安装的应用通常要等重新安装(或浏览器下一次 manifest 更新读到新的 src)才会换图标。

同时替换 PWA 安装图标选项

把网页「安装为应用」时,浏览器弹出的安装对话框也会显示你的图标:

PWA 安装对话框

页面 Logo 图标

勾选同时替换页面 Logo 图标,网页左上角品牌 logo 里的鲸鱼图标就会换成你上传的这张——deepseek HARNESS 文字不受影响。选项关闭时显示官方鲸鱼;改动立即生效,刷新/重启都保留。

说明:

  • 该选项默认不勾选
  • 上传后随时可以勾选/取消,不用重新上传文件。
  • 只影响侧边栏的品牌图标(deepseek HARNESS 旁边那只);PWA 安装图标是上面的另一个选项。

支持的格式

  • SVG — 按内容(<svg)识别,并拦截 <script> / 事件属性 / javascript: 注入。上传前会在浏览器里栅格化成 PNG。
  • PNG — 按魔数识别(容忍部分优化器产生的前导字节),并校验 IHDR → … → IEND 结构。
  • ICO / CUR — CUR 当作 ICO 接受。后端会提取内嵌的 PNG;仅含 BMP 帧的 ICO 无法栅格化,会回退为原样透传。
  • JPEG — 直接接受,当作位图基准。

上传的原始文件原样保存,不重新编码,favicon 的透明背景和画质都不损失;派生的 PWA / Logo PNG 集合是从它单独生成的。

持久化

图标按用户保存在 $DSH_HOME/custom-favicon/恢复默认只清除当前生效标记,已保存的文件会保留,为将来的图标库 UI 做准备。

许可证

MIT