dsh-pick 0.7.3 → 0.7.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,16 +2,41 @@
2
2
 
3
3
  [![npm version](https://img.shields.io/npm/v/dsh-pick.svg?style=flat-square)](https://www.npmjs.com/package/dsh-pick)
4
4
  [![npm downloads](https://img.shields.io/npm/dm/dsh-pick.svg?style=flat-square)](https://www.npmjs.com/package/dsh-pick)
5
+ [![GitHub stars](https://img.shields.io/github/stars/AIcivilization/dsh-pick?style=flat-square)](https://github.com/AIcivilization/dsh-pick/stargazers)
5
6
  [![license](https://img.shields.io/npm/l/dsh-pick.svg?style=flat-square)](LICENSE)
7
+ [![dsh-pick](https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2FAIcivilization%2Fdsh-pick%2Fcatalog%2Fbadge%2Fdsh-pick.json&style=flat-square)](#给你的插件加排名徽章)
6
8
  [![Listed on dsh-plugin.org](https://dsh-plugin.org/badges/listed.svg)](https://dsh-plugin.org/plugins/aicivilization/dsh-pick)
7
9
 
8
- **帮你在 DSH 生态里选对插件。**
10
+ **帮你在 DSH(DeepSeek Harness)生态里选对插件。**
9
11
 
10
- 说需求 → 找候选 → 多维比较 → 出结论。下载量只是证据,判断才算数。
12
+ 把 dshmarket、dsh-plugin-shop、dsh-m 精选、DeepSeek 官方和 npm 上的插件合成一份目录(3 万多个,去重),
13
+ 按去噪后的真实使用量、口碑、维护、稳定性排名。说出需求,它给你首选 / 备选 / 不推荐,在面板里一键安装。
14
+
15
+ > Pick the right plugin for DeepSeek Harness. dsh-pick merges every DSH plugin market plus npm into one
16
+ > deduplicated catalog (30k+ plugins), ranks them by denoised usage, reputation, maintenance and stability,
17
+ > and installs with one click from the DSH sidebar. Plugin authors get a free README rank badge.
18
+
19
+ <p>
20
+ <img src="https://raw.githubusercontent.com/AIcivilization/dsh-pick/main/docs/rank.jpg" width="300" alt="综合榜:几个市场合成一个榜,六个排序角度">
21
+ &nbsp;
22
+ <img src="https://raw.githubusercontent.com/AIcivilization/dsh-pick/main/docs/watch.jpg" width="300" alt="我的监控:盯自家产品和竞品,按指标排名、算差距">
23
+ </p>
24
+
25
+ **能做什么**
26
+
27
+ - **选插件**:说需求找候选,或用「AI 精选」让 DSH 当前的大模型读完简介挑给你;候选卡片直接安装,装之前先告诉你能不能装
28
+ - **综合榜**:几个插件市场合成一个榜,一个插件只出现一次;综合推荐、最多人用、口碑、稳定可靠、上升最快、新上架六个角度
29
+ - **去噪指标**:npm 下载量被发版日的 CI、镜像流量放大好几倍,dsh-pick 扣掉这部分,算出日常基线
30
+ - **比较清单**:任意几个插件逐项对比,标出每项最好的
31
+ - **我的监控**:盯自家产品和竞品,看名次、差距和这次的变化
32
+ - **和对话联动**:给 AI 注册了 4 个工具,在对话里直接问「哪个数据库插件靠谱」
33
+ - **DSH「发现」索引源**:每天生成一份官方格式的插件索引
34
+ - **README 排名徽章**:插件作者把名次挂进自己的 README,[见下文](#给你的插件加排名徽章)
35
+
36
+ > 觉得好用?到右上角点个 ⭐ Star,也欢迎[提建议、报问题](https://github.com/AIcivilization/dsh-pick/issues/new/choose)。
11
37
 
12
38
  > 定位对比:`dsh-find-plugin` 负责「**找到**」(搜 GitHub 仓库,按 star 排);
13
39
  > `dsh-pick` 负责「**挑对**」(算去噪指标,给首选 / 备选 / 不推荐)。
14
- > 一个 `find_dsh_plugin`,一个 `pick_plugin`。
15
40
 
16
41
  ---
17
42
 
@@ -30,6 +55,33 @@ dsh plugin --profile web add github:AIcivilization/dsh-pick # 源码安装
30
55
 
31
56
  ---
32
57
 
58
+ ## 给你的插件加排名徽章
59
+
60
+ 插件作者可以把自己插件在 dsh-pick 综合榜(综合推荐角度)上的名次挂进 README,每天跟着目录自动更新:
61
+
62
+ | 名次 | 徽章写的是 | 颜色 |
63
+ |---|---|---|
64
+ | 前 10 名 | `#3 of 25,272` | 亮绿 |
65
+ | 前 100 名 | `#42 of 25,272` | 绿 |
66
+ | 前 10% | `top 3%` | 黄绿 |
67
+ | 其余 | `top 45%` | 蓝 |
68
+ | 收录了、还没排名 | `listed` | 灰 |
69
+
70
+ **最省事**:在 dsh-pick 的「我的监控」里加上你的插件,点 ☆ 标成「我的产品」,「监控详情」最下面有「复制 Markdown」。
71
+
72
+ **手写**:把下面的 `<包名>` 换成你的 npm 包名(带 scope 的照写,比如 `@scope/name`):
73
+
74
+ ```markdown
75
+ [![dsh-pick](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/AIcivilization/dsh-pick/catalog/badge/<包名>.json)](https://github.com/AIcivilization/dsh-pick)
76
+ ```
77
+
78
+ 只在 GitHub、没发到 npm 的插件,把 `badge/<包名>.json` 换成 `badge/gh/<owner>/<repo>.json`(只有进了综合榜存下来的头部才有)。
79
+ 想让插件进榜:npm 包带 `dsh-plugin` 关键字、在 `package.json` 声明 `dsh.bundle`;被 dshmarket、dsh-plugin-shop 等市场收录也会进来。
80
+
81
+ 徽章文件由每日构建生成(`scripts/badges.mjs`),放在本仓库 `catalog` 分支的 `badge/` 目录,shields.io 读它画图。
82
+
83
+ ---
84
+
33
85
  ## 为什么需要它
34
86
 
35
87
  npm 官网和各类 stat 站能看数字,但看数字回答不了「我该装哪个」。
@@ -94,6 +146,7 @@ dsh plugin --profile web add dsh-pick
94
146
  - **这次的变化**:和至少 12 小时前的那次刷新比,只列明显的(发了新版、下载涨跌两成以上、星标、名次变化),我的产品排前面
95
147
  - **按指标排**:选一个指标(周下载、日常基线、环比、星标、综合榜名次、npm 总榜、最近发版…),每个插件一行横条按名次排;我的产品写出第几、落后第 1 名多少、领先下一名多少
96
148
  - **全部数据**:侧栏够宽时是完整表格(每个插件一列);窄的时候点哪个插件,下面列出它的全部数据(30 天走势、下载、版本、GitHub、市场位置)
149
+ - **README 排名徽章**:标成「我的产品」的插件,最下面给出徽章预览和「复制 Markdown」([说明](#给你的插件加排名徽章))
97
150
 
98
151
  每次刷新在本机存一份快照,显示「较上次」的涨跌(排名写成升 / 降几名);打开时数据超过 6 小时会自动刷新。
99
152
 
@@ -183,6 +236,7 @@ dsh-pick/
183
236
  │ ├── ai-pick.js AI 精选:用 DSH 的大模型召回候选、按需求挑选
184
237
  │ ├── market-index.js 生成 DSH「发现」页用的插件索引(index.json)
185
238
  │ ├── market-source.js 把插件索引加进 DSH「发现」的索引源
239
+ │ ├── badges.js README 排名徽章:名次 → shields.io endpoint 文件
186
240
  │ ├── classify.js 13 类 + 其他,关键词加权分类
187
241
  │ ├── metrics.js 去噪指标:基线 / 增速 / 节奏 / 新鲜度 / 健康度
188
242
  │ ├── words.js 需求 → 搜索词(同义词 + 中文二元切分),CLI 与面板共用
@@ -190,7 +244,9 @@ dsh-pick/
190
244
  ├── data/catalog.json 随包自带的目录(兜底;每日更新的那份在 ~/.dsh/dsh-pick/)
191
245
  ├── scripts/
192
246
  │ ├── release.mjs 发版脚本(npm run release)
193
- │ └── catalog-meta.mjs 每日目录发布前的校验
247
+ │ ├── catalog-meta.mjs 每日目录发布前的校验
248
+ │ └── badges.mjs 每日构建时生成排名徽章文件(推到 catalog 分支 badge/)
249
+ ├── docs/ README 用的截图
194
250
  ├── test/ npm test(Node 自带的 node:test,不装任何依赖)
195
251
  ├── .github/workflows/catalog.yml 每天重建目录、推到 catalog 分支
196
252
  ├── plugin/
package/lib/badges.js ADDED
@@ -0,0 +1,83 @@
1
+ // lib/badges.js — 插件作者贴进 README 的排名徽章
2
+ //
3
+ // 每日构建时给综合榜(综合推荐角度)里的每个插件写一个 shields.io endpoint 文件,
4
+ // 和目录一起推到 catalog 分支的 badge/ 目录下:
5
+ // npm 包 badge/<包名>.json (带 scope 的就是 badge/@scope/name.json)
6
+ // 只在 GitHub badge/gh/<owner>/<repo>.json
7
+ // 徽章图片由 shields.io 读这个文件画出来(BADGE_IMG),点徽章进 dsh-pick 的 GitHub。
8
+ // 名次的算法和面板一致(web/panel.js 的 overallPool + angleRank):存下来的头部行加上每个 npm 包自带的 oa 分数。
9
+
10
+ import { ANGLES } from './overall.js'
11
+
12
+ export const REPO = 'AIcivilization/dsh-pick'
13
+ export const BADGE_BASE = `https://raw.githubusercontent.com/${REPO}/catalog/badge/`
14
+ export const BADGE_LINK = `https://github.com/${REPO}`
15
+
16
+ // 徽章左边的小图标:和 DSH 里 dsh-pick 页签的图标同一条折线,白色
17
+ const LOGO = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path d="M6 22l6-7 5 5 9-11" fill="none" stroke="#fff" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/></svg>'
18
+
19
+ /** 一个插件的徽章文件在 catalog 分支里的相对路径(badge/ 之后的部分) */
20
+ export function badgePath(key) {
21
+ const k = String(key)
22
+ return (k.startsWith('gh:') ? 'gh/' + k.slice(3) : k) + '.json'
23
+ }
24
+
25
+ /** 徽章图片地址(shields.io 读 endpoint 文件) */
26
+ export function badgeImage(key) {
27
+ return 'https://img.shields.io/endpoint?url=' + encodeURIComponent(BADGE_BASE + badgePath(key))
28
+ }
29
+
30
+ /** 贴进 README 的 Markdown */
31
+ export function badgeMarkdown(key) {
32
+ return `[![dsh-pick](${badgeImage(key)})](${BADGE_LINK})`
33
+ }
34
+
35
+ /**
36
+ * 综合推荐角度下每个插件的名次。
37
+ * @returns {{ ranks: Map<string, number>, total: number }}
38
+ */
39
+ export function overallRanks(catalog) {
40
+ const o = catalog && catalog.boards && catalog.boards.overall
41
+ if (!o || !Array.isArray(o.rows)) return { ranks: new Map(), total: 0 }
42
+ const angles = o.angles || ANGLES
43
+ const ai = angles.indexOf('rec')
44
+ const seen = new Set(o.rows.map(r => r.k))
45
+ const pool = o.rows.filter(r => r.a && r.a.rec != null).map(r => ({ k: r.k, v: r.a.rec, w: wOf(catalog, r) }))
46
+ for (const rec of Object.values(catalog.packages || {})) {
47
+ if (!rec.oa || seen.has(rec.n) || rec.oa[ai] == null) continue
48
+ pool.push({ k: rec.n, v: rec.oa[ai], w: rec.w || 0 })
49
+ }
50
+ pool.sort((x, y) => y.v - x.v || y.w - x.w)
51
+ return { ranks: new Map(pool.map((r, i) => [r.k, i + 1])), total: Math.max(o.total || 0, pool.length) }
52
+ }
53
+
54
+ function wOf(catalog, row) {
55
+ const rec = row.n && catalog.packages && catalog.packages[row.n]
56
+ return rec ? rec.w || 0 : row.w || 0
57
+ }
58
+
59
+ /** shields.io endpoint 的内容。名次靠前写「#12 of 14,074」,往后写「top 23%」,没上榜写「listed」 */
60
+ export function badgeJson(rank, total) {
61
+ const base = { schemaVersion: 1, label: 'dsh-pick', logoSvg: LOGO, cacheSeconds: 21600 }
62
+ if (!rank || !total) return { ...base, message: 'listed', color: 'lightgrey' }
63
+ const share = rank / total
64
+ const message = rank <= 100
65
+ ? `#${rank} of ${total.toLocaleString('en-US')}`
66
+ : `top ${Math.max(1, Math.ceil(share * 100))}%`
67
+ const color = rank <= 10 ? 'brightgreen' : rank <= 100 ? 'green' : share <= 0.1 ? 'yellowgreen' : 'blue'
68
+ return { ...base, message, color }
69
+ }
70
+
71
+ /**
72
+ * 整个目录的徽章文件:已排名的插件给名次,目录里收录了但没排名的 npm 包给「listed」。
73
+ * @returns {Array<[string, object]>} [相对路径, 内容]
74
+ */
75
+ export function buildBadges(catalog) {
76
+ const { ranks, total } = overallRanks(catalog)
77
+ const out = []
78
+ for (const [k, rank] of ranks) out.push([badgePath(k), badgeJson(rank, total)])
79
+ for (const name of Object.keys(catalog.packages || {})) {
80
+ if (!ranks.has(name)) out.push([badgePath(name), badgeJson(0, total)])
81
+ }
82
+ return out
83
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dsh-pick",
3
- "version": "0.7.3",
4
- "description": "帮你在 DSH 生态里选对插件:说需求 → 找候选 → 多维比较 → 出结论。下载量是证据,AI 是推理。",
3
+ "version": "0.7.5",
4
+ "description": "DSH 插件选型助手:几个插件市场和 npm 的 3 万多个插件合成一个榜,去噪排名、AI 精选、一键安装;插件作者可领 README 排名徽章。",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/AIcivilization/dsh-pick.git"
@@ -72,7 +72,9 @@
72
72
  "npm-stats",
73
73
  "plugin-market",
74
74
  "marketplace",
75
- "plugin-manager"
75
+ "plugin-manager",
76
+ "plugin-ranking",
77
+ "readme-badge"
76
78
  ],
77
79
  "license": "MIT",
78
80
  "engines": {
package/plugin/client.js CHANGED
@@ -59,6 +59,45 @@ window.__ModuleLoader__.load({
59
59
  }, children)
60
60
  }
61
61
 
62
+ const REPO = 'AIcivilization/dsh-pick'
63
+ const STAR_KEY = 'dsh-pick-stars-v1'
64
+
65
+ /** 「⭐ Star」:打开 GitHub 仓库页,用户在那里点星。顺带显示现有星数(取不到就不显示) */
66
+ function StarLink() {
67
+ const [stars, setStars] = useState(() => {
68
+ try { const c = JSON.parse(sessionStorage.getItem(STAR_KEY) || 'null'); return c ? c.n : null } catch { return null }
69
+ })
70
+ useEffect(() => {
71
+ let alive = true
72
+ try { if (sessionStorage.getItem(STAR_KEY)) return } catch {}
73
+ fetch('https://api.github.com/repos/' + REPO, { headers: { accept: 'application/vnd.github+json' } })
74
+ .then(r => (r.ok ? r.json() : null))
75
+ .then(j => {
76
+ if (!alive || !j || typeof j.stargazers_count !== 'number') return
77
+ setStars(j.stargazers_count)
78
+ try { sessionStorage.setItem(STAR_KEY, JSON.stringify({ n: j.stargazers_count })) } catch {}
79
+ })
80
+ .catch(() => {})
81
+ return () => { alive = false }
82
+ }, [])
83
+ return h('a', {
84
+ href: 'https://github.com/' + REPO,
85
+ target: '_blank',
86
+ rel: 'noopener',
87
+ title: L('觉得好用?到 GitHub 给 dsh-pick 点个星', 'Like it? Star dsh-pick on GitHub'),
88
+ style: {
89
+ display: 'inline-flex', alignItems: 'center', gap: 4, textDecoration: 'none',
90
+ fontSize: 12, lineHeight: '18px', padding: '2px 10px', borderRadius: 6, whiteSpace: 'nowrap',
91
+ border: '1px solid ' + C.border, color: C.text,
92
+ },
93
+ },
94
+ h('span', { 'aria-hidden': true }, '⭐'),
95
+ 'Star',
96
+ typeof stars === 'number' && stars > 0
97
+ ? h('span', { style: { color: C.sub, fontVariantNumeric: 'tabular-nums', borderLeft: '1px solid ' + C.border, paddingLeft: 6, marginLeft: 2 } }, stars.toLocaleString())
98
+ : null)
99
+ }
100
+
62
101
  /** 一条给用户自己在终端执行的命令:等宽显示,旁边一个「复制」 */
63
102
  function CommandLine({ command }) {
64
103
  const [copied, setCopied] = useState(false)
@@ -156,6 +195,14 @@ window.__ModuleLoader__.load({
156
195
  h('span', { style: { fontSize: 15, fontWeight: 650 } }, 'dsh-pick'),
157
196
  info && info.running ? h('span', { style: { fontSize: 12, color: C.sub, fontVariantNumeric: 'tabular-nums' } }, 'v' + info.running) : null,
158
197
  h(Btn, { onClick: upd.onClick, disabled: upd.disabled || busy, primary: upd.primary, title: upd.title }, upd.label),
198
+ h(StarLink),
199
+ h('a', {
200
+ href: 'https://github.com/' + REPO + '/issues/new/choose',
201
+ target: '_blank',
202
+ rel: 'noopener',
203
+ title: L('提建议、报问题(GitHub Issues)', 'Ideas and bug reports (GitHub Issues)'),
204
+ style: { fontSize: 12, color: C.sub, textDecoration: 'none', whiteSpace: 'nowrap' },
205
+ }, L('反馈', 'Feedback')),
159
206
  h('span', { style: { flex: 1 } }),
160
207
  phase === 'removed'
161
208
  ? h('span', { style: { fontSize: 12, color: C.sub } }, L('已卸载,重启 DSH 后彻底移除', 'Uninstalled; restart DSH to finish'))
package/web/panel.html CHANGED
@@ -253,6 +253,13 @@ table.cmp.wd svg.spark{display:block;margin-left:auto}
253
253
  .wdm{display:flex;flex-wrap:wrap;gap:6px;margin:2px 0 10px}
254
254
  .wdm button{appearance:none;border:1px solid var(--line);background:var(--panel);color:var(--t2);font-family:inherit;font-size:11.5px;padding:3px 9px;border-radius:12px;cursor:pointer}
255
255
  .wdm button.on{background:var(--accent);border-color:var(--accent);color:#fff}
256
+ .wdbadge{margin-top:12px;font-size:12px}
257
+ .wdbadge .hd{font-weight:600;color:var(--text);margin-bottom:6px}
258
+ .wdbadge .bg{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:6px 0;border-top:1px solid var(--line)}
259
+ .wdbadge .bn{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:40%;color:var(--t2)}
260
+ .wdbadge img{height:20px;display:block}
261
+ .wdbadge button{margin-left:auto}
262
+ .wdbadge .cap{margin:6px 0 0}
256
263
  .wdmine{margin:0 0 8px;font-size:12px;line-height:1.7;color:var(--t2)}
257
264
  .wdmine div{padding:6px 10px;border-radius:8px;background:color-mix(in srgb,var(--warn,#f5a623) 12%,var(--panel));margin-bottom:4px}
258
265
  .wdmine b{color:var(--text)}
@@ -570,6 +577,7 @@ td.down{color:var(--bad);font-weight:600}
570
577
  <p class="cap wdnote">横条按名次比长短,数值差太大时(下载量)用对数刻度。点 ☆ 把自家产品标成「我的」,排名时算出和对手的差距。「较上次」和上一次刷新比:每次刷新都在本机存一份快照。</p>
571
578
  <div class="tblwrap" id="wdTable"><table class="cmp wd"><thead id="wdHead"></thead><tbody id="wdBody"></tbody></table></div>
572
579
  <div id="wdOne" class="wdone hidden"></div>
580
+ <div id="wdBadge" class="wdbadge"></div>
573
581
  </div>
574
582
  </div>
575
583
 
package/web/panel.js CHANGED
@@ -1460,9 +1460,42 @@ function renderWatchDetail(list) {
1460
1460
  if (!list.includes(WD_SEL)) WD_SEL = list.find(n => mineNow.includes(n)) || list[0]
1461
1461
  if (!WD_METRICS.some(m => m.k === WD_METRIC)) WD_METRIC = 'w'
1462
1462
  renderWdChanges(list)
1463
+ renderWdBadges(list)
1463
1464
  paintWd()
1464
1465
  }
1465
1466
 
1467
+ /* ---------- README 排名徽章:每日构建给每个插件写一个 shields.io endpoint 文件(lib/badges.js) ---------- */
1468
+ const BADGE_BASE = 'https://raw.githubusercontent.com/AIcivilization/dsh-pick/catalog/badge/'
1469
+ const BADGE_LINK = 'https://github.com/AIcivilization/dsh-pick'
1470
+ const badgeImg = key => 'https://img.shields.io/endpoint?url=' + encodeURIComponent(BADGE_BASE + (key.startsWith('gh:') ? 'gh/' + key.slice(3) : key) + '.json')
1471
+ const badgeMd = key => `[![dsh-pick](${badgeImg(key)})](${BADGE_LINK})`
1472
+
1473
+ /** 我的产品各给一个徽章和「复制」;还没标的,提示一句怎么拿 */
1474
+ function renderWdBadges(list) {
1475
+ const box = $('#wdBadge')
1476
+ const keys = list.filter(n => mine().includes(n))
1477
+ box.innerHTML = keys.length
1478
+ ? '<div class="hd">README 排名徽章</div>' +
1479
+ keys.map(n => `<div class="bg"><span class="bn">${esc(watchName(n))}</span>` +
1480
+ `<img src="${esc(badgeImg(n))}" alt="dsh-pick 排名徽章" loading="lazy" referrerpolicy="no-referrer">` +
1481
+ `<button type="button" class="btn ghost sm" data-badge="${esc(n)}">复制 Markdown</button></div>`).join('') +
1482
+ '<p class="cap">贴进插件的 README,名次每天跟着目录自动更新;点徽章会打开 dsh-pick。</p>'
1483
+ : '<p class="cap">在上面给自家插件点 ☆ 标成「我的产品」,这里会给出贴进 README 的排名徽章。</p>'
1484
+ }
1485
+
1486
+ async function copyText(text) {
1487
+ try { await navigator.clipboard.writeText(text); return true } catch { /* iframe 里可能不让用,退回老办法 */ }
1488
+ const ta = document.createElement('textarea')
1489
+ ta.value = text
1490
+ ta.style.cssText = 'position:fixed;opacity:0'
1491
+ document.body.appendChild(ta)
1492
+ ta.select()
1493
+ let ok = false
1494
+ try { ok = document.execCommand('copy') } catch { /* 复制不了 */ }
1495
+ ta.remove()
1496
+ return ok
1497
+ }
1498
+
1466
1499
  /** 选中的指标、选中的插件变了:重画横条、单个插件、表格(数据不重算) */
1467
1500
  function paintWd() {
1468
1501
  if (!WD) return
@@ -1609,6 +1642,12 @@ $('#secWatchDetail').addEventListener('click', e => {
1609
1642
  return
1610
1643
  }
1611
1644
  if (e.target.closest('[data-mine]')) return // 星标由 document 上的委托处理
1645
+ const bd = e.target.closest('[data-badge]')
1646
+ if (bd) {
1647
+ const md = badgeMd(bd.dataset.badge)
1648
+ copyText(md).then(ok => (ok ? toast('已复制徽章的 Markdown,贴进 README 就行') : toast('复制不了,手动复制这段:', md)))
1649
+ return
1650
+ }
1612
1651
  const row = e.target.closest('[data-wd]')
1613
1652
  if (row) { WD_SEL = row.dataset.wd; paintWd() }
1614
1653
  })