MCPcopy Create free account
hub / github.com/zxlie/FeHelper / _renderOmniSearchState

Function _renderOmniSearchState

apps/json-format/content-script.js:281–290  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

279 };
280
281 let _renderOmniSearchState = state => {
282 state = state || (window.Formatter && Formatter.getSearchState && Formatter.getSearchState()) || {current: 0, total: 0};
283 let text = state.total ? (state.current + '/' + state.total) : '0/0';
284 $('#fhJsonSearchCount')
285 .text(text)
286 .toggleClass('is-empty', !state.total);
287 $('#fhJsonSearchTrigger')
288 .attr('title', state.total ? ('搜索结果:' + text) : '搜索 Key / 值')
289 .toggleClass('has-result', !!state.total);
290 };
291
292 let _refreshOmniSelectionState = () => {
293 window.Formatter && Formatter.getSelectionInfo && Formatter.getSelectionInfo();

Callers 4

_resetOmniActionsFunction · 0.85
_syncOmniToolbarStateFunction · 0.85
_runOmniSearchFunction · 0.85
_bindOmniSelectionEventsFunction · 0.85

Calls 1

$Function · 0.50

Tested by

no test coverage detected