╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ script.js ────────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │http│ ssh │ │ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
335 if (event.button !== 0 || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) return; 336 // wasm routes the click: an in-page link just moves focus and re-renders, 337 // a cross-page one calls _navigate. suppress the <a>'s own navigation so 338 // an in-page link doesn't also trigger a redundant full page load. 339 event.preventDefault(); 340 const focusId = Number(span.dataset.focusId); 341 wasmInstance.exports._onMouseClick(focusId); 342 wasmInstance.exports._tick(minRows(), maxCols()); 343 }); 344 345 let resizeTimer = null; 346 window.addEventListener("resize", () => { 347 clearTimeout(resizeTimer); 348 resizeTimer = setTimeout(() => { 349 wasmInstance.exports._tick(minRows(), maxCols()); 350 }, 100); 351 }); 352 }); 353