static/js/select.js
/**
 * Update highlight control status.
 * @function updateHighlight
 * @param {Object} mo - main object
 */
Update highlight control status.
@function updateHighlight
@param {Object} mo - main object
Update highlight control status . @function updateHighlight @param { Object } mo - main object
function updateHighlight(mo) {
  const counts = listCats(mo.highed);
  const ps = byId('high-menu').children;
  let p;
  for (const [idx, count] of Object.entries(counts)) {
    p = ps.item(idx - 1);
    p.firstChild.innerHTML = count ? count : '&nbsp;';
    p.lastChild.classList.toggle('hidden', !count);
  }
}
function updateHighlight ( mo ) { const counts = listCats ( mo . highed ) ; const ps = byId ( 'high-menu' ) . children ; let p ; for ( const [ idx , count ] of Object . entries ( counts ) ) { p = ps . item ( idx - 1 ) ; p . firstChild . innerHTML = count ? count : '&nbsp;' ; p . lastChild . classList . toggle ( 'hidden' , ! count ) ; } }
Update highlight control status.
Update highlight control status .