html/mainPage/js/main.js
// Should improve performance by excluding hidden packets
Should improve performance by excluding hidden packets
Should improve performance by excluding hidden packets
function wrappedClusterizeUpdate (htmlArray) {
  sharedVars.hiddenPacketsAmount = 0
  const newArray = []
  for (const item of htmlArray) {
    if (item[0].match(/<li .* class=".*filter-hidden.*">/)) {
      sharedVars.hiddenPacketsAmount += 1
    } else {
      newArray.push(item)
    }
  }
  clusterize.update(newArray)
  hiddenPacketsCounter.innerHTML = sharedVars.hiddenPacketsAmount + ' hidden packets';
  if (sharedVars.hiddenPacketsAmount != 0) {
    hiddenPacketsCounter.innerHTML += ' (<a href="#" onclick="showAllPackets()">show all</a>)'
  }
}
function wrappedClusterizeUpdate ( htmlArray ) { sharedVars . hiddenPacketsAmount = 0 const newArray = [ ] for ( const item of htmlArray ) { if ( item [ 0 ] . match ( / <li .* class=".*filter-hidden.*"> / ) ) { sharedVars . hiddenPacketsAmount += 1 } else { newArray . push ( item ) } } clusterize . update ( newArray ) hiddenPacketsCounter . innerHTML = sharedVars . hiddenPacketsAmount + ' hidden packets' ; if ( sharedVars . hiddenPacketsAmount != 0 ) { hiddenPacketsCounter . innerHTML += ' (<a href="#" onclick="showAllPackets()">show all</a>)' } }
Should improve performance by excluding hidden packets
Should improve performance by excluding hidden packets
// If the packet is hidden