bit-twiddler 0.1.0

Cross-platform developer toolbox: bit manipulation, hashing, YAML/JSON/SQL, QR, Markdown, cron, and 40+ more tools — Tauri v2, no Node.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
  // MARKDOWN PREVIEWER (via IPC → marked in main process)
  // ============================================================
  let mdDebounce = null;
  $('#markdown-input').on('input', function() {
    clearTimeout(mdDebounce);
    mdDebounce = setTimeout(async () => {
      const md = $(this).val();
      if (!md.trim()) { $('#markdown-preview').html(''); return; }
      try {
        const html = await window.tauriApi.renderMarkdown(md);
        $('#markdown-preview').html(html);
      } catch(e) { console.error('Markdown render error:', e); }
    }, 120);
  });

  // ============================================================