Skip to content
  • Cédric Le Ninivin's avatar
    WebTorrent: upgrade to v2.8.5, persistent torrent gadget, deduplicate code · 59077b5f
    Cédric Le Ninivin authored
    
    
    Upgrade WebTorrent from v1.x to v2.8.5 (getBlob callback → blob() promise).
    Patch the ESM bundle to expose window.WebTorrent global for script tag usage.
    
    Create a persistent torrent gadget (gadget_cribjs_torrent) declared in
    index.html alongside the router and header. It holds a single WebTorrent
    client that survives page navigations — seeding no longer stops when the
    user leaves the export page.
    
    Migrate all 4 pages that used WebTorrent directly (export, save_load,
    import, landing) to use acquired methods from the torrent gadget instead.
    This eliminates 3 duplicate copies of downloadTorrent() and ensures a
    single shared client instance.
    
    Add share link + copy button to the save_load page after torrent seeding.
    Add torrent_download acquisition chain through add_application for the
    landing gadget.
    
    Co-Authored-By: default avatarClaude Opus 4.6 (1M context) <noreply@anthropic.com>
    59077b5f