torrent javascript