╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ script.js ────────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │http│ ssh │ │ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
225 // leave modified / non-left clicks (open-in-new-tab, etc.) to the browser 226 if (event.button !== 0 || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) return; 227 // wasm routes the click: an in-page link just moves focus and re-renders, 228 // a cross-page one calls _navigate. suppress the <a>'s own navigation so 229 // an in-page link doesn't also trigger a redundant full page load. 230 event.preventDefault(); 231 const focusId = Number(span.dataset.focusId); 232 wasmInstance.exports._onMouseClick(focusId); 233 wasmInstance.exports._tick(minRows(), maxCols()); 234 }); 235 236 let resizeTimer = null; 237 window.addEventListener("resize", () => { 238 clearTimeout(resizeTimer); 239 resizeTimer = setTimeout(() => { 240 wasmInstance.exports._tick(minRows(), maxCols()); 241 }, 100); 242 }); 243 }); 244