INNER CODE UNIT · JavaScript

total

LeyckerS/moondownloader · web/app.js:341

    const total = dn + ff + ot;
    $("#linkCount").textContent = T("links_n", total);
    $("#cntDn").textContent = dn;
    $("#cntFf").textContent = ff;
    $("#cntOther").textContent = ot;
    const pct = (n) => (total ? (n / total) * 100 : 0);
    $("#mixDn").style.width = pct(dn) + "%";
    $("#mixFf").style.width = pct(ff) + "%";
    $("#mixOther").style.width = pct(ot) + "%";
    for (const [sel, n] of [[".lg.dn", dn], [".lg.ff", ff], [".lg.ot", ot]]) {
      $(sel).classList.toggle("off", !n);
    }
  },

  repaint() {
    const lines = this.lines();
    if (lines.length > 1500) { this.paint.textContent = this.ta.value; return; }
    this.paint.innerHTML = lines

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…