@objectivex666/dsh-settings-search 1.4.1 → 1.4.2
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/lib/client.js +4 -5
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -30,7 +30,7 @@ window.__ModuleLoader__.load({
|
|
|
30
30
|
|
|
31
31
|
const NS = 'settings-search-v5'
|
|
32
32
|
/** Single source of truth is package.json — scripts/check.mjs asserts this matches. */
|
|
33
|
-
const PKG_VERSION = '1.4.
|
|
33
|
+
const PKG_VERSION = '1.4.2'
|
|
34
34
|
const NPM_NAME = '@objectivex666/dsh-settings-search'
|
|
35
35
|
const zh = {
|
|
36
36
|
title: '设置',
|
|
@@ -302,8 +302,6 @@ window.__ModuleLoader__.load({
|
|
|
302
302
|
const buttons = panelButtons()
|
|
303
303
|
const textOf = (b) => (b.textContent ?? '').trim()
|
|
304
304
|
const hit = buttons.find((b) => textOf(b) === want)
|
|
305
|
-
?? buttons.find((b) => textOf(b).startsWith(want))
|
|
306
|
-
?? buttons.find((b) => want.length >= 2 && textOf(b) !== '' && (textOf(b).includes(want) || want.includes(textOf(b))))
|
|
307
305
|
if (!hit) return false
|
|
308
306
|
hit.click()
|
|
309
307
|
return true
|
|
@@ -319,11 +317,12 @@ window.__ModuleLoader__.load({
|
|
|
319
317
|
/** Jump to an in-page option: open its page, select its tab, flash its row. */
|
|
320
318
|
const jumpToOption = async (item) => {
|
|
321
319
|
const opened = await Promise.resolve(clickNavButton(item.parentLabel))
|
|
320
|
+
if (opened !== true) { flashOptionRow(item); return false }
|
|
322
321
|
await delay(160)
|
|
323
322
|
const label = item.label
|
|
324
323
|
const buttons = panelButtons()
|
|
325
|
-
const tab = buttons.find((b) =>
|
|
326
|
-
|
|
324
|
+
const tab = buttons.find((b) =>
|
|
325
|
+
b.getAttribute('role') === 'tab' && (b.textContent ?? '').trim() === label)
|
|
327
326
|
if (tab) { tab.click(); await delay(120) }
|
|
328
327
|
flashOptionRow(item)
|
|
329
328
|
return opened
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@objectivex666/dsh-settings-search",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.2",
|
|
4
4
|
"description": "DSH settings panel search plugin – instantly filter setting sections and general items with navigation guidance. Installable via `dsh plugin add`.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dsh",
|