╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ script.js ────────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │http│ ssh │ │ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
449 // leave modified / non-left clicks (open-in-new-tab, etc.) to the browser 450 if (event.button !== 0 || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) return; 451 // wasm routes the click: an in-page link updates focus and re-renders, 452 // a cross-page one calls _navigate. suppress the <a>'s own navigation so 453 // an in-page link doesn't also trigger a redundant full page load. 454 event.preventDefault(); 455 const focusId = Number(span.dataset.focusId); 456 wasmInstance.exports._onMouseClick(focusId); 457 wasmInstance.exports._tick(minRows(), maxCols()); 458 }); 459 460 let resizeTimer = null; 461 window.addEventListener("resize", () => { 462 clearTimeout(resizeTimer); 463 resizeTimer = setTimeout(() => { 464 wasmInstance.exports._tick(minRows(), maxCols()); 465 }, 100); 466 }); 467 }); 468