INNER CODE UNIT · JavaScript

run

ucscGenomeBrowser/kent · src/hg/utils/registryPages/index.js:103

  function run(){
    var v = q.value.trim().toLowerCase();
    var view = document.body.getAttribute('data-view');
    var noun = view === 'az' ? ' names' : ' rows';
    var total = chips[view].length;
    hide();
    if (!v){
      document.body.classList.remove('filtering','noresult');
      cnt.textContent = fmt(total) + noun;
      return;
    }
    document.body.classList.add('filtering');
    var shown = 0;
    Object.keys(views).forEach(function(k){
      var n = 0;
      for (var i=0;i<chips[k].length;i++){
        var hit = chips[k][i].getAttribute('data-n').indexOf(v) !== -1;
        chips[k][i].classList.toggle('on', hit);

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…