MCPcopy Create free account
hub / github.com/docsifyjs/docsify / updatePlaceholder

Function updatePlaceholder

src/plugins/search/component.js:208–221  ·  view source on GitHub ↗
(text, path)

Source from the content-addressed store, hash-verified

206}
207
208function updatePlaceholder(text, path) {
209 const $input = Docsify.dom.getNode('.search input[type="search"]');
210
211 if (!$input) {
212 return;
213 }
214
215 if (typeof text === 'string') {
216 $input.placeholder = text;
217 } else {
218 const match = Object.keys(text).filter(key => path.indexOf(key) > -1)[0];
219 $input.placeholder = text[match];
220 }
221}
222
223function updateNoData(text, path) {
224 if (typeof text === 'string') {

Callers 1

updateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…