INNER CODE UNIT · JavaScript

eased

LeyckerS/moondownloader · web/app.js:210

    const eased = 1 - Math.pow(1 - k, 3);
    el.textContent = fmt(from + (to - from) * eased);
    if (k < 1) el._raf = requestAnimationFrame(tick);
    else { el.dataset.v = String(to); el.textContent = fmt(to); }
  };
  el.dataset.v = String(to);
  el._raf = requestAnimationFrame(tick);
}

/* ── transports ───────────────────────────────────────────────────────── */
class HttpApi {
  constructor() { this.token = new URLSearchParams(location.search).get("t") || ""; }

  async _call(name, args = []) {
    try {
      const res = await fetch(`api/${name}`, {
        method: "POST",
        headers: { "Content-Type": "application/json", "X-Moon-Token": this.token },

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…